Open Bug 147806 Opened 23 years ago Updated 2 years ago

Drop down part of popup menus displayed in the wrong place when in nested scrollable views

Categories

(Core :: XUL, defect, P2)

defect

Tracking

()

People

(Reporter: mark.kobine, Unassigned)

Details

(Keywords: embed, helpwanted)

Attachments

(3 files, 1 obsolete file)

If you have a popup menu in nested (2 or more) scrollable views the drop down part will display in the wrong place if any of the outer most views are scrolled. This problem does not occur if the popup menu is within a single scrollable view i.e. non-nested views. The problem does not occur if only the innermost view is scrolled and none of the outer ones are. What appears to be happening is that if any of the outer views are scrolled then these are ignored when calculating the position of the drop down.
Use test.xul in conjunction with test.css to reproduce the problem.
Use this in conjunction with test.xul to reproduce the problem.
Keywords: embed
Attached patch Patch that fixes the problem. (obsolete) — Splinter Review
This patch does appear to fix the problem but I'm unsure that it's 100% kosher as I don't fully understand what's going on.
Dup of one (or many) of: bug#53318 bug#64902 bug#67661 bug#86909 bug#129782 ??
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: patch, review
Changing priority to P2.
Priority: -- → P2
-> XPTOOLKIT-XUL
Assignee: attinasi → hyatt
Component: Layout → XP Toolkit/Widgets: XUL
QA Contact: petersen → shrir
Here's an updated version of the patch, could this get some r/sr love please? If it's band-aid that shouldn't be applied or WONTFIX, could someone give us some feedback as to why?
Attachment #85412 - Attachment is obsolete: true
interesting
Assignee: hyatt → varga
Comment on attachment 107012 [details] [diff] [review] Updated patch that applies against the trunk looks good too r=varga
I think this should be folded into the equivalent loop in GetViewOffset, since this is the only place GetViewOffset is called and GetViewOffset seems to be logical place to do all this. In fact I don't understand the comments in GetViewOffset. I think you should be able to just run up the views and add in each view's position. I don't see why we need to check bounds.y >= 0 etc etc. We should just add in the offset for every view. Also, instead of calling GetBounds you should call GetPosition. Bounds.x is not always position.x (sometimes views have stuff spilling out to their left or top of their actual position!!).
Keywords: helpwanted
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: shrir → xptoolkit.widgets
I see something similar to this very old bug. With a scrollable PlacesToolbar element, bookmark folder dropdowns can appear where the unscrolled anchor button would have been, even though the button is actually scrolled to somewhere else. The menupopup appears to be positioned using boxObject.x and boxObject,y of the button when screenx and screeny would be more correct.
Assignee: jvarga → nobody
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: