Closed
Bug 362403
Opened 18 years ago
Closed 18 years ago
showPopup does not work as documented
Categories
(Toolkit :: UI Widgets, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: djpnewton, Unassigned)
References
Details
(Keywords: testcase)
Attachments
(1 file)
1.02 KB,
application/vnd.mozilla.xul+xml
|
Details |
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0
At http://developer.mozilla.org/en/docs/XUL:Method:showPopup it is specified that a popup can be positioned using screen coordinates (parameters x & y), however the popup is only positioned correctly when the element parameter is "document.documentElement".
This bug occurs on trunk (moz 1.9a) and Firefox 2 (moz 1.81)
Reproducible: Always
Actual Results:
Popup is positioned at 0,0 relative to the document
Expected Results:
Popup is positioned at x,y in screen coordinates.
Reporter | ||
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
Has simplified testcase, and the behavior seen does appear to go against the documentation, confirming.
Comment 3•18 years ago
|
||
Not necessary to fix this bug once 279703 is done. It adds an openPopupAtScreen method.
Depends on: 279703
Comment 4•18 years ago
|
||
In AllPeers we have a dynamic menu in the navigator on the left, that is opened oncontextmenu event by building the menu and calling showPopup().
The code we used was this:
var menuElement = document.getElementById("apFileBoxContextMenu");
menuElement.showPopup(aEvent.target, aEvent.screenX, aEvent.screenY, "context", null, null);
However, after a right click in the main browser window (default browser context menu), second call to the same menu misplaced the popup.
The problem has been solved by changing the code to:
var parent = document.getElementById("apNavigatorPanel");
document.popupNode = parent;
menuElement.showPopup(parent, aEvent.clientX, aEvent.clientY, "context", null, null);
Would be nice to have this fixed, it takes some hours to figure this out, I was testing this with Bon Echo 2.0.0.1.
Comment 5•18 years ago
|
||
Oops, it looks I should have written this to bug #287357. Aren't those two duplicates?
Comment 6•18 years ago
|
||
Should now be fixed with bug 279703.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•