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

Bug 407531

Summary: [sidebar] Popup menus clipped by Orion editor pane
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ClientAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ken_walker, Mike_Wilson
Version: 2.0Flags: mamacdon: review+
Target Milestone: 3.0 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-05-08 10:08:39 EDT
1. Go to the editor page
2. Click the Actions (gear) menu in the left-hand navigator and expand some of the submenus
3. When the submenus have grown wide enough to intersect with the editor pane, they appear underneath it. 

This is wrong. They should be drawn over top of it.
Comment 1 Mark Macdonald CLA 2013-05-08 16:45:34 EDT
Actually the problem is:
- Dropdown menus are descendents of the left-hand pane
- Dropdown menus have position:absolute
- Left-hand pane has position:relative
- Left-hand pane has overflow:hidden

This effectively lays out the dropdown menus relative to the left-hand pane, with the left-hand pane truncating their width. (Recall that position:absolute positions elements against their nearest ancestor having a position that is not 'static'. In this case, that is the left-hand pane, which means the dropdown menus have to go inside the pane.)

I tried all the z-index magic I could think of, but there doesn't seem to be a way to undo overflow truncation from the ancestor. Will either have to (a) change dropdowns to position:fixed, or (b) modify the dropdown framework to create its DOM elements near the top of the document, so there won't be ancestors in the way to screw them up.

(b) seems more correct.
Comment 2 Mark Macdonald CLA 2013-05-24 11:12:51 EDT
This will require changing the dropdown menu framework such that menus are not attached to the DOM beside the trigger node, but rather directly under <body>, or maybe a child element of <body> that holds all menus.
Comment 3 Anthony Hunter CLA 2013-05-29 11:16:13 EDT
The rightPane having the position: absolute; is what is actually causing the clipping.

Another option would be to change how the auxpane / split / rightPane are laid out by using position: relative; instead.

I am going to give this a try first, as option (b) above will also work but involves a lot more effort and will move all the menus completely out of the DOM.
Comment 4 Anthony Hunter CLA 2013-06-03 13:35:26 EDT
Upon further debugging the position:absolute / position:relative does not completely resolve the problem.

However, I have been able to resolve the problem by adjusting the overflow properties.

Please give the changes a test. They are at https://github.com/ahunter-orion/orion.client/commit/50847d293c8a83bd2d36e237b9ca555d45bfb5c1

I assert that I authored 100% of the content of this contribution and have the rights to donate the content to Eclipse under the EPL
Comment 5 Mark Macdonald CLA 2013-06-04 17:36:15 EDT
Looks/works good. Pushed: 

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=e1aa264