Closed Bug 785764 Opened 12 years ago Closed 11 years ago

Work - <select> popup for forms is always in the top left corner of the screen

Categories

(Firefox for Metro Graveyard :: General, defect)

All
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 21

People

(Reporter: jimm, Assigned: mbrubeck)

References

Details

(Whiteboard: feature=work)

Attachments

(2 files, 1 obsolete file)

The container inherits a style that changed with the menu rework in bug 785280. The popup also needs metro styling.
Component: Theme → General
Product: Firefox → Firefox for Metro
It looks like this is basically working now except for one thing: The popup for the select menu is always in the top-left corner.  We should make it use the positioning logic from MenuUI.

Also, we probably don't want to use the popup at all for precise input on <select multiple> or <select size=n> elements (with n > 1).
Assignee: nobody → mbrubeck
Blocks: 831979, 831982
No longer blocks: 785763
Summary: Select popup currently doesn't work, needs metro styling → <select> popup is always in the top left corner
Hardware: x86_64 → All
Summary: <select> popup is always in the top left corner → Work - <select> popup for forms is always in the top left corner of the screen
Whiteboard: feature=work
Attached patch WIP (obsolete) — Splinter Review
Uses the MenuPopup class to position the SelectHelper menu.  Still has some bugs with clicking items in the menu.
This ports SelectHelperUI to use the MenuPopup class to manage showing/hiding/positioning its popup.  This lets of get rid of quite a lot of code in the process.

I will file follow-up bugs for these two known problems:

* When the menu is too tall, some items are pushed off-screen and there is no way to scroll the menu to see them.

* Clicking with the mouse should on a <select> box with attribute "multiple", or size > 1, should probably not show the touch-friendly popup.
Attachment #712048 - Attachment is obsolete: true
Attachment #712554 - Flags: review?(jmathies)
Comment on attachment 712554 [details] [diff] [review]
part 1: Use MenuPopup for positioning

Review of attachment 712554 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/metro/base/content/helperui/SelectHelperUI.js
@@ +82,2 @@
>  
> +    //this._scrollElementIntoView(firstSelected);

Did you intend to leave this commented out?
(In reply to Jim Mathies [:jimm] from comment #4)
> > +    //this._scrollElementIntoView(firstSelected);
> 
> Did you intend to leave this commented out?

Yes, it's currently broken (throws an exception) and should be fixed with the first follow-up bug mentioned above.  I'll add a comment explaining this.
Attachment #712554 - Flags: review?(jmathies) → review+
Two things:
1) Set maxHeight/maxWidth to stop menus from overflowing the screen.
2) Since part 1 replaced our <scrollbox> with a <richlistbox>, we can use ensureElementIsVisible and get rid of our DIY version.
Attachment #712620 - Flags: review?(jmathies)
Attachment #712554 - Attachment description: patch → part 1: Use MenuPopup for positioning
Comment on attachment 712620 [details] [diff] [review]
part 2: Fix height and scrolling of tall menus

more cold code removed - awesome.
Attachment #712620 - Flags: review?(jmathies) → review+
Folded the two patches together and landed on elm:
http://hg.mozilla.org/projects/elm/rev/6d4766ea292e
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 21
No longer blocks: 831982
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: