Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 320508

Summary: [Menu] Contextmenu doesn't opoen when clicked on subwidget
Product: [RT] RAP Reporter: Tim Buschtoens <tbuschto>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Istvan.Ballok, tbuschto
Version: 1.3   
Target Milestone: 1.4 M1   
Hardware: All   
OS: All   
Whiteboard:

Description Tim Buschtoens CLA 2010-07-21 09:46:27 EDT
E.g. when clicking on a TreeRow the Tree contextmenu doesn't open.
Comment 1 Tim Buschtoens CLA 2010-07-21 09:52:33 EDT
Fixed in CVS HEAD in Menu.js
Comment 2 Istvan Ballok CLA 2010-12-02 09:38:39 EST
This fix is also relevant for the Table widget in RAP 1.3.
Otherwise, the context menu in Safari is not displayed. (after the first time)

Explanation
===========
The problem here is, that Safari simulates the "Mac" behaviour 
for the mouse event of the "oncontextmenu" listener: the ctrlKey is true, 
although no modifier key was pressed.

Because of this, the Table.js#_onRowContextMenu does not show
the context menu. (_isNoModifierPressed check)

In Menu.js, the context menu is shown without the modifier key check.
However, the event happens on the TableRow, and the ContextMenu is 
on the Table.
-> it is important to use the current target when this event bubbles up
the widget composition tree.

=> this is exactly what this fix does.