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:

  1. Load sample01.html
  2. Insert a table
  3. Place keyboard cursor into any cell.
  4. Right-click on the cell.
  5. 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 Hallvord R. M. Steen (Opera Software)

Priority: NormalHigh

This pretty much break the context menu's bottom entries - unreachable. I take the liberty of increasing priority.

comment:2 Changed 17 years ago by Hallvord R. M. Steen (Opera Software)

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 Hallvord R. M. Steen (Opera Software)

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 Hallvord R. M. Steen (Opera Software)

Owner: set to Frederico Caldeira Knabben

comment:5 Changed 17 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy