Bug 362243

Summary: Select item form context menu by mouse right click brings the menu again
Product: [RT] RAP Reporter: Penka <pveleva>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P3 CC: tbuschto
Version: 1.4Keywords: ui
Target Milestone: 1.5 M3   
Hardware: PC   
OS: All   
Whiteboard:

Description Penka CLA 2011-10-27 17:01:28 EDT
Build Identifier: 1.4.1

Selecting an item from a context menu by using RIGHT mouse click (not left) brings the menu again.

Reproducible: Always

Steps to Reproduce:
Use RAP Workbench demo eclipsesource web site
1.Select Repository/Principal 0.
2.Right click to display the context menu.
3.Select New Project by RIGHT mouse click (not left).
4.The dialog opens.
5.The context menu shows again.
This was introduced in RAP 1.4.0. Did not happen in RAP 1.3.x
Comment 1 Ivan Furnadjiev CLA 2011-10-31 04:14:38 EDT
Reproducible with CVS HEAD as well.
Comment 2 Tim Buschtoens CLA 2011-10-31 13:01:45 EDT
This is my theory of what happens:

1. browser fires mousedown, TreeRow gains focus
2. browser fires mouseup, contextmenu -> menu opens
3. browser fires mousedown, mouseup -> menu closes
4. Now the browser should fire the contextmenu event (as a direct result of the mouseup with a right mouse button). However, the element that was clicked on is no longer in DOM (the menu). It therefore falls back on the last focused element: The TreeRow. The Menu opens again.

If this is correct, the solution would be to somehow prevent the second contextmenu event from beeing fired, either on the DOM or on the widget layer.
Comment 3 Tim Buschtoens CLA 2011-11-02 10:47:27 EDT
Fixed in CVS HEAD by changing menu detection from "contextmenu" to "mouseup". However, this fix is not suit suitable for the 1.4 branch.
Comment 4 Ivan Furnadjiev CLA 2012-01-24 04:11:03 EST
Tim, you mark this bug as "sr142?". Do you have a patch for the maintenance branch?
Comment 5 Tim Buschtoens CLA 2012-01-24 06:07:53 EST
Will not be fixed in 1.4.2 since the fix cant be ported easily, and the issue is not a critical one.