Open Bug 543418 Opened 11 years ago Updated 8 years ago

Anchored popups fail to consider anchor node clipping due to scrolling


(Core :: XUL, defect)

Windows 7
Not set




(Reporter: ecfbugzilla, Unassigned)




(1 file)

998 bytes, application/vnd.mozilla.xul+xml
Attached file Testcase
You can display a XUL popup relative to an anchor node - e.g. you specify before_start position to have the popup appear at the upper-left corner of the anchor node. However, if the anchor node is in a scrollable document and part of it is clipped away the popup fails to consider this clipping, it will appear in some distance to the visible part of the anchor node.
Steps to reproduce with the testcase attached:

1. Go to menu Tools / Error Console.
2. Copy the following into the "Code" text field and click "Evaluate": window.openDialog("", "_blank", "left=100,top=100,width=100,height=100,chrome")
3. The green area is the anchor node for the popup. Click it and observe the popup being displayed at the upper edge of the green area.
4. Now scroll down somewhat and click the green area again.

Expected results: the popup appears at the upper edge of the green area.

Actual results: the popup appears in some distance to the upper edge of the green area, even above the window. The distance depends on the amount of scrolling.
You need to log in before you can comment on or make changes to this bug.