Opened 17 years ago
Closed 17 years ago
#1200 closed Bug (fixed)
Opera: context menu can disappear suddenly
Reported by: | Aleksey Onopriyenko | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Must have (possibly next milestone) | Milestone: | Opera Compatibility |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Sometimes context menu disappears while moving mouse over it.
Steps to reproduce:
- Load sample01.html
- Insert a table
- Place keyboard cursor into any cell.
- Right-click on the cell.
- Try to select 'Delete Table' item in context menu (move mouse over context menu from top to bottom)
Tested with Opera 9.23 and Opera 9.50 alpha (build 9500)
Change History (5)
comment:1 Changed 17 years ago by
Priority: | Normal → High |
---|
comment:2 Changed 17 years ago by
I believe this happens due to blur and focus events on IFRAMEs being queued rather than sent immediately.
Activating the element below one with a submenu will run FCKMenuBlock_Item_OnActivate.
// Set the focus to this menu block window (to fire OnBlur on opened panels). if ( !FCKBrowserInfo.IsIE && oActiveItem.HasSubMenu && !this.HasSubMenu ) menuBlock._Window.focus() ; oActiveItem.Deactivate() ;
The expectation is that the _Window.focus() call will fire an immediate onfocus event, setting that panel's HasFocus to true. The Deactivate call that follows will de-activate the submenu and call parent's Unlock method, which will close the parent if it doesn't have focus.
In Opera, onfocus and onblur are queued and run after the current thread finishes, also on a focus()/blur() call.
I think you should set HasFocus on the parent panel directly without relying on blur/focus events..
comment:3 Changed 17 years ago by
Example fix (though you may want to call a function that sets focus instead?)
// Set the focus to this menu block window (to fire OnBlur on opened panels). if ( !FCKBrowserInfo.IsIE && oActiveItem.HasSubMenu && !this.HasSubMenu ){ menuBlock._Window.focus() ; menuBlock.Panel.HasFocus=true; }
comment:4 Changed 17 years ago by
Owner: | set to Frederico Caldeira Knabben |
---|
comment:5 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Your propositions worked like a charm Hallvord, and should not bring any drawback.
Fixed with [919]. Click here for more info about our SVN system.
This pretty much break the context menu's bottom entries - unreachable. I take the liberty of increasing priority.