Closed Bug 389573 Opened 14 years ago Closed 14 years ago

Context menus open in wrong place on mail addresses in tbird/seamonkey

Categories

(Core :: XUL, defect)

x86
Linux
defect
Not set
major

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: enndeakin)

References

Details

(Keywords: regression)

Attachments

(1 file)

STEPS TO REPRODUCE:

1) Start Seamonkey or Thunderbird
2) Select a message
3) Right-click on the "To" e-mail address

EXPECTED RESULTS: Context menu opens to the right of and below the mouse pointer

ACTUAL RESULTS: Context menu opens with the first option right under the pointer

ADDITIONAL INFO: On Linux this automatically selects that first option, which is a major problem, imo.

This regressed on the same day that bug 279703 landed.
Flags: blocking1.9?
This is caused because the address popup uses a popupanchor but no popupalign attribute.

<popup id="emailAddressPopup" popupanchor="bottomleft">

Not using both causes the popup to not be aligned and just appear over top of the element. This popup is used for left and context clicks. Is this popup supposed to be aligned underneath the email address, or just appear at the mouse location?

There's still a popup bug here though. Context clicks should always appear at the mouse position and ignore the alignment.
 
Status: NEW → ASSIGNED
The patch does two things:
  - always uses the mouse position for context menus
  - make sure both popupalign and popupanchor are set, otherwise use the mouse position.
Attachment #274163 - Flags: superreview?(bzbarsky)
Attachment #274163 - Flags: review?(bzbarsky)
Comment on attachment 274163 [details] [diff] [review]
fix popup position

>Index: content/xul/content/src/nsXULPopupListener.cpp
>   // if the popup has an anchoring attribute, anchor it to the element,
>   // otherwise just open it at the screen position where the mouse was clicked.

Update this comment to the new reality?

>+      (mPopupContent->HasAttr(kNameSpaceID_None, nsGkAtoms::position) ||
>+       mPopupContent->HasAttr(kNameSpaceID_None, nsGkAtoms::popupanchor) &&
>+       mPopupContent->HasAttr(kNameSpaceID_None, nsGkAtoms::popupalign))) {

Please add parens around the && expression to make it very clear what's going on here?

I assume the developer docs will be adjusted to cover this?
Attachment #274163 - Flags: superreview?(bzbarsky)
Attachment #274163 - Flags: superreview+
Attachment #274163 - Flags: review?(bzbarsky)
Attachment #274163 - Flags: review+
Attachment #274163 - Flags: approval1.9?
Comment on attachment 274163 [details] [diff] [review]
fix popup position

a1.9=dbaron
Attachment #274163 - Flags: approval1.9? → approval1.9+
Flags: blocking1.9? → blocking1.9+
Status: ASSIGNED → RESOLVED
Closed: 14 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.