Closed Bug 1168212 Opened 10 years ago Closed 10 years ago

[e10s] select element can show no options if the anchoring element is narrow

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
e10s m7+ ---
firefox41 --- fixed

People

(Reporter: gw280, Assigned: gw280)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

STR: - In bugzilla, go to attachment details and choose one of the select dropdowns to set review status - Note that only a single tick appears as a visible option (OS X) or only '?' and '-' appear (on Linux) Expected results: - Select dropdown should have '?', '+', '-' and ' ' visible as selectable options. This appears to be an issue with the width of the select dropdown, and I suspect it's been caused by bug 1049285 where we anchor the popup properly. It basically looks like we have too much padding on the left side (especially on OS X, where we are indicating the currently selected option by showing a tick to the left of it) and so the option is being pushed out of the popup to the right.
Assignee: nobody → gwright
The root cause of this is that with bug 1049285, the width of the popup now is constrained to the width of the dropdown. Non-e10s the dropdown content is styled with the page's CSS, so the sizes match. With e10s we use the system styling, and the big paddings on OSX dropdown menu makes that width not enough to display the contents.
We also need to be able to ensure that the popup can exceed the size of its anchoring element, such as for the following test case: data:text/html,<!DOCTYPE html><html><body><select style="width:70px;"><option value="short">Short</option><option value="long">Loooooooooooooooooooooooooong</option></select></body></html>
This effectively reverts the width sizing behaviour for popups to back to what they were before the patch for bug 1049285 landed. They are still positioned correctly, though (so this won't re-introduce bug 1049285).
Attachment #8612511 - Flags: review?(enndeakin)
I think we should deal with the popups having too much padding (as per felipe's comment) in a separate bug, as I think this is a valid issue (the popups should be sized larger than the anchoring select element if necessary, such as in the testcase in comment 4).
Comment on attachment 8612511 [details] [diff] [review] 0001-Ensure-popups-have-a-minimum-width-of-their-preferre.patch > if (aSizedToPopup) { > nsBoxLayoutState state(PresContext()); > // XXXndeakin can parentSize.width still extend outside? >- SetBounds(state, nsRect(mRect.x, mRect.y, parentWidth, mRect.height)); >+ SetBounds(state, nsRect(mRect.x, mRect.y, mRect.width, mRect.height)); You can just pass mRect directly to SetBounds. Since this is mostly limited to the use of MenuPopupAnchorType_Rect, i think this should minimize any issues, so let's go with this. Make sure to file a followup though, as <select> popups are now all a bit too wide.
Attachment #8612511 - Flags: review?(enndeakin) → review+
We already have a bug for that: https://bugzilla.mozilla.org/show_bug.cgi?id=1128159, so I think we can just track it there.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: