Ticket #1200 (closed Bug: fixed)

Opened 7 years ago

Last modified 7 years ago

Opera: context menu can disappear suddenly

Reported by: aleksey Owned by: fredck
Priority: High 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

comment:1 Changed 7 years ago by hallvord@…

  • Priority changed from Normal to High

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

comment:2 Changed 7 years ago by hallvord@…

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 7 years ago by hallvord@…

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 7 years ago by hallvord@…

  • Owner set to fredck

comment:5 Changed 7 years ago by fredck

  • Status changed from new to closed
  • Resolution set to fixed

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 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy