Bug 372176 - Cascaded menus not showing at correct position
Summary: Cascaded menus not showing at correct position
Status: ASSIGNED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 440217 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-02-21 19:27 EST by Chris Fairhall CLA
Modified: 2014-10-06 03:05 EDT (History)
2 users (show)

See Also:


Attachments
screenshot of rwtdemo (9.95 KB, image/png)
2012-02-21 19:29 EST, Chris Fairhall CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Fairhall CLA 2012-02-21 19:27:39 EST
Build Identifier: 1.5.0-N-20120202-0214

Menus for CASCADE Menu Items are covering their parent item when they do not fit to the right of the menu.

Reproducible: Always

Steps to Reproduce:
Open the rwtdemo
Drag window to right of browser space
Open menu, open sub-menu

Sub menu should not obscure its parent.
Comment 1 Chris Fairhall CLA 2012-02-21 19:29:47 EST
Created attachment 211375 [details]
screenshot of rwtdemo

Menu menu "myfile.txt" should render to the left of "Open recently used >", not over top of it. Its very hard for a user to navigate when there are several cascade items in a menu.
Comment 2 Chris Fairhall CLA 2012-03-22 22:12:50 EDT
I don't have CVS access here so I'm struggling to creating a diff to attach...

Adding these lines to /org.eclipse.rap.rwt/qx/ui/popup/Popup.js at line ~288 fixes the problem. 

if( this._opener instanceof org.eclipse.rwt.widgets.MenuItem ) {   
    var parentMenu = this._opener.getParentMenu();
    var parentLeft = parentMenu.getLeft();
    if (parentLeft) {
        if (left < parentLeft) { 
       	    left = parentLeft - width;
        } 
    }
}
Comment 3 Ivan Furnadjiev CLA 2014-07-23 09:13:43 EDT
*** Bug 440217 has been marked as a duplicate of this bug. ***
Comment 4 Chris Fairhall CLA 2014-10-05 16:58:11 EDT
Is there any plan to fix this issue?
The fix I provided 2.5 years ago works in 2.3.1 if you change "org.eclipse.rwt.widgets.MenuItem" to "rwt.widgets.MenuItem"
Comment 5 Ivan Furnadjiev CLA 2014-10-06 03:05:32 EDT
(In reply to Chris Fairhall from comment #4)
> Is there any plan to fix this issue?
> The fix I provided 2.5 years ago works in 2.3.1 if you change
> "org.eclipse.rwt.widgets.MenuItem" to "rwt.widgets.MenuItem"

Could you please contribute your fix trough our Gerrit system [1]? First create a change against RAP master branch. Once the fix is approved we could consider it for backporting to RAP 2.3.2.

[1] https://git.eclipse.org/r/#/