Open Bug 522192 Opened 16 years ago Updated 3 years ago

Popup with before_end and before_start position can overlap anchor element if close to screen edge

Categories

(Core :: XUL, defect)

x86
Windows XP
defect

Tracking

()

UNCONFIRMED

People

(Reporter: kpdecker, Unassigned)

Details

Attachments

(1 file)

611 bytes, application/vnd.mozilla.xul+xml
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091007 Firefox/3.5.4 (.NET CLR 3.5.30729) Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.4) Gecko/20091007 Firefox/3.5.4 (.NET CLR 3.5.30729) When a xul:panel is configured with "before_end" or "before_start" position and the anchor element is close enough to the top of the screen that a portion of the panel would be displayed outside of the screen's viewport, the panel will overlap the anchor element. This seems like incorrect behavior due to 1. The comment found here (http://mxr.mozilla.org/mozilla1.9.1/source/layout/xul/base/src/nsMenuPopupFrame.cpp#1001) 2. The behavior when the panel overflows outside of the horizontal boundary of the screen. When this occurs the panel is temporarily switched to a position similar to "after_end" or "after_start" Reproducible: Always Steps to Reproduce: 1. Create a xul:panel element with position "before_end" anchored on an element whose y-position is less than the height of the panel. 2. Move the window containing the anchor element such that the panel would go off screen with the default layout. Actual Results: The panel coordinates are adjusted in order to stay on screen and ends up overlaping the anchor element. Expected Results: The panel should be moved to one of the after_X positions temporarily. This is related to http://code.google.com/p/fbug/issues/detail?id=2382
It appears that OS X does not attempt to reposition the panel at all, so the overlapped case does not occur, but portions of the panel my overflow outside of the screen.
Can you provide a testcase? And test this on latest trunk builds?
Attached file Test Case
Attached is the test file. To test: - Load the file such that the XUL file is a top-level window (i.e. not in a browser). - Click on the label and drag the window such that the panel would overflow the various screen bounds. Tested under the previously mentioned version as well as this one. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a1pre) Gecko/20091013 Minefield/3.7a1pre (.NET CLR 3.5.30729) Pulled from http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/ on 10/13/09 at 11pm PST
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: