Closed Bug 386795 Opened 17 years ago Closed 17 years ago

Popups positioned 1 off

Categories

(Core :: XUL, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: enndeakin, Assigned: enndeakin)

Details

Attachments

(1 file)

After the popup reworking patch (bug 279703), calling
    gMenuPopup.showPopup(gTrigger, -1, -1, "popup", "topleft", "topleft");
causes the popup to be offset by 1. This is because the code in nsMenuPopupFrame::InitializePopupWithAnchorAlign is erroneously adding the -1 x and y values to the anchor position. It should be using 0.
Initialize mXPos and mYPos to 0 when -1 are passed in.
Attachment #270963 - Flags: superreview?(roc)
Attachment #270963 - Flags: review?(roc)
Found this bug when creating the testcase in bug 279703 so no need for an extra test here. 
Flags: in-testsuite-
Attachment #270963 - Flags: superreview?(roc)
Attachment #270963 - Flags: superreview+
Attachment #270963 - Flags: review?(roc)
Attachment #270963 - Flags: review+
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: xptoolkit.menus → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: