View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000535 | SOGo | Web General | public | 2010-03-31 19:35 | 2010-03-31 21:00 |
Reporter | Jason Oster | Assigned To | francis | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 1.2.1 | ||||
Fixed in Version | 1.2.2 | ||||
Summary | 0000535: [patch] Popup menus opening partially off-screen | ||||
Description | The deltaX/deltaY variables in generic.js:popupMenu() are not used when calculating the popup menu position vs. the menu width & height. The attached patch is a fix. | ||||
Additional Information | Note that this patch also includes the addition of 1 to the heightDiff and leftDiff variables. This ensures that the menu will not appear under the mouse cursor. A click event fires on the popup menu after opening it if it's under the cursor when the right button is released; closing the menu. | ||||
Tags | No tags attached. | ||||
2010-03-31 19:35
|
SOGo-popup_position.patch (847 bytes)
--- UI/WebServerResources/generic.js~ 2010-03-31 04:02:48.000000000 -0700 +++ UI/WebServerResources/generic.js 2010-03-31 12:30:06.443333062 -0700 @@ -536,13 +536,13 @@ function popupMenu(event, menuId, target var menuTop = Event.pointerY(event) + deltaY; var menuLeft = Event.pointerX(event) + deltaX; - var heightDiff = (window.height() - - (menuTop + popup.offsetHeight)); + var heightDiff = ((window.height() + deltaY) + - (menuTop + popup.offsetHeight + 1)); if (heightDiff < 0) menuTop += heightDiff; - var leftDiff = (window.width() - - (menuLeft + popup.offsetWidth)); + var leftDiff = ((window.width() + deltaX) + - (menuLeft + popup.offsetWidth + 1)); if (leftDiff < 0) menuLeft -= popup.offsetWidth; |
Update to patch: the +1 was not getting added to the actual position in the leftDiff case. |
|
2010-03-31 20:03
|
SOGo-popup_position-v2.patch (894 bytes)
--- UI/WebServerResources/generic.js~ 2010-03-31 04:02:48.000000000 -0700 +++ UI/WebServerResources/generic.js 2010-03-31 12:59:14.463344552 -0700 @@ -536,15 +536,15 @@ function popupMenu(event, menuId, target var menuTop = Event.pointerY(event) + deltaY; var menuLeft = Event.pointerX(event) + deltaX; - var heightDiff = (window.height() - - (menuTop + popup.offsetHeight)); + var heightDiff = ((window.height() + deltaY) + - (menuTop + popup.offsetHeight + 1)); if (heightDiff < 0) menuTop += heightDiff; - var leftDiff = (window.width() + var leftDiff = ((window.width() + deltaX) - (menuLeft + popup.offsetWidth)); if (leftDiff < 0) - menuLeft -= popup.offsetWidth; + menuLeft -= (popup.offsetWidth + 1); var isVisible = true; if (popup.prepareVisibility) |
Nice catch! Thanks for the patch. Fixed in revision b4e7bba523520804e5e2156a93f9fd775463b75f |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2010-03-31 19:35 | Jason Oster | New Issue | |
2010-03-31 19:35 | Jason Oster | File Added: SOGo-popup_position.patch | |
2010-03-31 20:02 | Jason Oster | Note Added: 0000838 | |
2010-03-31 20:03 | Jason Oster | File Added: SOGo-popup_position-v2.patch | |
2010-03-31 21:00 | francis | Note Added: 0000840 | |
2010-03-31 21:00 | francis | Status | new => resolved |
2010-03-31 21:00 | francis | Fixed in Version | => 1.2.2 |
2010-03-31 21:00 | francis | Resolution | open => fixed |
2010-03-31 21:00 | francis | Assigned To | => francis |