Closed
Bug 358576
Opened 18 years ago
Closed 18 years ago
[FIX] Some combinations of popup menu popupanchor/popupalign are not implemented
Categories
(Core :: XUL, enhancement)
Tracking
()
RESOLVED
INVALID
People
(Reporter: MatsPalmgren_bugz, Assigned: MatsPalmgren_bugz)
Details
(Keywords: testcase)
Attachments
(2 files)
15.87 KB,
application/vnd.mozilla.xul+xml
|
Details | |
5.53 KB,
patch
|
roc
:
review-
roc
:
superreview-
|
Details | Diff | Splinter Review |
Some combinations of popup menu popupanchor/popupalign are not implemented. http://developer.mozilla.org/en/docs/XUL:Method:showPopup Using them gives the warning: WARNING: Hmmm, looks like you've hit a anchor/align case we weren't setup for.: file nsMenuPopupFrame.cpp, line 659 The code: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp&rev=1.294&root=/cvsroot&mark=606-659#579
Assignee | ||
Comment 1•18 years ago
|
||
Assignee | ||
Comment 2•18 years ago
|
||
This patch adds three new values, 'topmiddle' 'bottommiddle' and 'center', to the existing four and implements all 49 combinations. Let me know if you want 'leftmiddle' and 'rightmiddle' for consistency, they should be trivial to add.
Attachment #243955 -
Flags: superreview?(roc)
Attachment #243955 -
Flags: review?(roc)
Comment 3•18 years ago
|
||
popupalign and popupanchor are deprecated and should not be used. Do not add new values for it. Bug 279703 will deprecate the entire showPopup API.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Comment on attachment 243955 [details] [diff] [review] Patch rev. 1 minusing as per Neil
Attachment #243955 -
Flags: superreview?(roc)
Attachment #243955 -
Flags: superreview-
Attachment #243955 -
Flags: review?(roc)
Attachment #243955 -
Flags: review-
Assignee | ||
Comment 5•18 years ago
|
||
Hmm, so how would I position a popup centered as in the screenshot below using the new API? http://img221.imageshack.us/my.php?image=303192vd0.png
Comment 6•18 years ago
|
||
I'm not sure if that would be useful enough to build in support for centering popups considering that there would be so many possible combinations. But if you did, it would involve the position attribute.
Assignee | ||
Comment 7•18 years ago
|
||
Well, implementing all 49 combinations of 7 values takes roughly the same amount of code as the 9 combinations of 4 values that are currently implemented (7 are broken AFAICT). I'll have a look again should we decide to implement the accesskey popup menu as I suggested in bug 303192.
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.menus → xptoolkit.widgets
Comment 8•16 years ago
|
||
Centering a panel in a large parent element is difficult considering that the popup's natural width and height are not accessible until onpopupshown, which means there is a flash of motion as the panel is moved to the center.
You need to log in
before you can comment on or make changes to this bug.
Description
•