Closed Bug 934123 Opened 11 years ago Closed 11 years ago

Select dropdown is misaligned when in a flex container

Categories

(Core :: Layout, defect, P4)

28 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla29

People

(Reporter: daniel.nr01, Assigned: dholbert)

Details

(Keywords: testcase, Whiteboard: [good first verify])

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release)
Build ID: 20131030030201

Steps to reproduce:

* Visit http://telemetry.mozilla.org/#path=nightly/27/A11Y_CONSUMERS
* Click down arrow of the middle select element
* Try to scroll by dragging the scrollbar


Actual results:

* The dropdown is aligned to he left instead of to the select element itself (It's even more clear with the "reason*" dropdown)
* You can't drag the scrollbar

The issue is resolved by itself if you move the mouse back and forth over the edge of the dropdown...
I can reproduce this with latest Aurora (build ID: 20131103004005) on Win 7 64-bit.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Untriaged → XUL
Product: Firefox → Core
Severity: normal → minor
Component: XUL → Layout
OS: Windows 7 → All
Hardware: x86_64 → All
Summary: Select dropdown is misaligned and has a non functioning scrollbar → Select dropdown is misaligned when in a flex container
Attached file Testcase #1
It appears to be caused by 'display:flex' on the "nav" element.

STR:
1. load the testcase
2. resize the window width
3. click on the select element
Keywords: testcase
Priority: -- → P4
Attached file Testcase #2
Reduced the testcase a bit.
(As with the previous testcase, you generally have to resize the window to trigger this in testcase 2; though sometimes I hit it even without that.)
Attached patch fix v1Splinter Review
Looks like the issue is that we're failing to pass NS_FRAME_NO_MOVE_VIEW into FinishReflowChild.  So, when one of our "measuring" reflows calls FinishReflowChild with position 0,0 [1], the select frame ends up moving its popup's view to position 0,0.

We already pass NS_FRAME_NO_MOVE_FRAME to the actual ReflowChild calls (which includes the NO_MOVE_VIEW bit).  We should just ensure we pass that consistently to ReflowChild and FinishReflowChild.

This patch makes that consistent, and fixes the bug.

[1] (position 0,0 because we haven't finished resolving flexible lengths etc. yet, so we don't know where anything is)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #8349121 - Flags: review?(matspal)
Comment on attachment 8349121 [details] [diff] [review]
fix v1

Seems reasonable.  r=mats
Attachment #8349121 - Flags: review?(matspal) → review+
https://hg.mozilla.org/mozilla-central/rev/de950d66a584
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Daniel, could you please verify that this is fixed for you in Firefox 29?
Flags: needinfo?(daniel.nr01)
Whiteboard: [good first verify]
The issue is indeed resolved for me in Aurora 29.0a2 (2014-03-10).
Flags: needinfo?(daniel.nr01)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: