Open Bug 859620 Opened 12 years ago Updated 3 years ago

Resizer in menupopup moves popup off of its anchor if popup is anchored on its right-hand side

Categories

(Core :: XUL, defect)

2.0 Branch
x86
All
defect

Tracking

()

People

(Reporter: u462496, Unassigned)

Details

Attachments

(4 files, 1 obsolete file)

1.39 KB, application/vnd.mozilla.xul+xml
Details
2.48 KB, application/x-xpinstall
Details
1.41 KB, application/vnd.mozilla.xul+xml
Details
8.48 KB, application/x-xpinstall
Details
Attached file extension demonstrating the bug (obsolete) —
This bug is observed both on WindowsOS and MacOS. When putting a resizer in a menupopup, if the popup is anchored on its right-hand size, eg, topright or bottomright, when attempting to resize the popup smaller than than min-width, the entire popup begins moving off of its anchor position. This does not happen if the popup is anchored on its left-hand side (topleft, bottomleft), ie, it remains in its anchor position even if attempting to resize smaller. Attached is an extension demonstrating the bug; install addon, enable addons bar, click "Resize Bug Demo" to open demo dialog. Find two menu buttons, "Test #1" and "Test #2". Each contain menupopups that have a min-width of 130px. "Test #1": Popup is anchored bottomleft (after_start); drag the resizer, observe that when attempting to drag to the left to a size smaller than 130px, right-hand edge of popup merely ceases to move. "Test #2": Popup is anchored bottomright (after_end); drag the resizer, observe that when attempting to drag to the right to a size smaller than 130px, entire popup begins to move to the right, moving it off its anchor.
Attached file xul
I am unable to open or view your attachment
You should allow to open remote xul
Attachment #734945 - Attachment is obsolete: true
Attached file XUL 2
The problem occurs when max-width is set also. If someone can suggest a clean workaround it would be welcome.
Attachment #735231 - Attachment mime type: application/octet-stream → application/x-xpinstall
Component: Untriaged → XP Toolkit/Widgets: XUL
Product: Firefox → Core
Version: 21 Branch → 2.0 Branch
Status: UNCONFIRMED → NEW
Ever confirmed: true
Perhaps this will provide a clue? : In seeking a workaround for this problem, I created a custom resizer that does not use the resizer element at all. It uses only Javascript and listens for mousemove events, resetting the width of the element with each event. This simple approach does not move the popup off of its anchor in either direction. It is also interesting to note that aside from not moving the anchor, the action seems to be smoother than with the resizer element, at least on MacOS. When resizing with the resizer element, the menu tends to "bounce". There is a little bit of this "bounciness" with the custom element, but it seems less. I notice also that with the resizer element, the more times you drag the menu back and forth during a resize action, the more severe the bounciness gets. I am attaching a demo of this custom resizer. Note that it uses a toobarbutton menu, because I have observed that any lack of smoothness manifests itself more prominently when the popup is in the toolbar than in a separate demo window. The button is labeled "TB RSZR" and has a red right-pointing arrow for an icon. A menu will open with the two resizers at the top for comparison. Another thing interesting to observe is that if you resize first using the resizer element, and then resize using the custom element without closing the menu first, the popup is now anchored on the left-hand side. This will not happen if you use the custom resizer after closing and re-opening the popup. Somehow the resizer element shifts the anchor to the left?
Attachment #737118 - Attachment mime type: application/octet-stream → application/x-xpinstall
Attachment #735233 - Attachment mime type: application/octet-stream → application/vnd.mozilla.xul+xml
Been 3 months, anything happening with this?
Component: XP Toolkit/Widgets: XUL → XUL
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: