Opened 4 years ago
Closed 4 years ago
#9956 closed defect (bug) (fixed)
Fix for submenu position and state on folded admin menu
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | Administration | Version: | 2.8 |
| Severity: | normal | Keywords: | javascript |
| Cc: |
Description
This patch has better math for determining the lower bounds of the pop-out sub menus in the "folded" admin menu.
The existing math is a bit hit and miss as it uses some strange derivative of the cursor position on mouse-over.
Also, the menu state should always be restored to apply proper classes to submenus, even when they are folded up. This allows the unfolding to reveal the right submenus straight away rather than on a page refresh.
Attachments (2)
Change History (7)
Also, this needs some basic cross-browser testing, although it only uses jQuery methods, so all the numbers should be right across browsers.
The popup submenu offset has to be calculated against the viewport (visible part of the page) not the page length (screenshot attached). For more precise calculation we can probably use event.target to get the exact position, think that's normalized in jQuery 1.3.2.
Attaching new diff that stops the menu from disappearing below the fold.

Sorry, I wasn't sure how to make the non-dev version of the JS file.