Closed Bug 500208 Opened 15 years ago Closed 15 years ago

<select> element should update label when script changes selection

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mfinkle, Assigned: vingtetun)

References

Details

Attachments

(7 files, 5 obsolete files)

35.20 KB, image/png
Details
29.24 KB, image/png
Details
31.17 KB, image/png
Details
28.25 KB, image/png
Details
65.66 KB, image/png
Details
12.50 KB, patch
mfinkle
: review+
Details | Diff | Splinter Review
1.82 KB, patch
bzbarsky
: review+
Details | Diff | Splinter Review
Fix in bug 472426 does not handle updating the <select> label when script changes the selection either using select.selectedIndex or option.selected
Attached patch CPP Part v0.1 (obsolete) — Splinter Review
This use the pre-existent pref ui.use_native_popup_windows (camino) for overriding the open popup behavior on mousedown.

I've not find a Flag for saying MOBILE, just WINCE && HILDON but it looks like there is not effect on desktop?

The downside of this hack is if a developer use an html:select on the right panel this doesn't work.
Vivien - We need a solution that can handle changing listbox <select> too. Not just combobox <select>
Attached patch Patch v0.2 (obsolete) — Splinter Review
Not sure of what you mean. 
http://mxr.mozilla.org/mozilla-central/source/layout/forms/nsListControlFrame.cpp#1011

ToolkitHasNativeMenu() is called in list too.

It can be my fault, if you have my patch it I've forgot the <children /> tag.
Attachment #385113 - Attachment is obsolete: true
OK, let's try moving this forward.
Attachment #385179 - Flags: review-
Comment on attachment 385179 [details] [diff] [review]
Patch v0.2

Also remove:

selectListDisplay.format

from browser.dtd
Attached patch Js part v0.3 (obsolete) — Splinter Review
Remove the string from browser.dtd
Display for the drop-down button in combobox
Attachment #385179 - Attachment is obsolete: true
Attached patch Js Part v0.4 (obsolete) — Splinter Review
Add [size=1] in css rules
Attachment #385234 - Attachment is obsolete: true
Is there more CSS you can remove from content.css now that much of the XBL
content has been removed? Things like ".select-label-box" and others?

Also, I talked to Boris about the C++ change. He is OK with it as along as we add "ui.use_native_popup_windows" to all.js - defaulted to false:

pref("ui.use_native_popup_windows", false);
Attached patch Js Part v0.5Splinter Review
Remove the unused CSS
Refactor bindings.xml and browser-ui.js
Attachment #385265 - Attachment is obsolete: true
Attached patch Cpp part V0.2Splinter Review
Add the pref in all.js defaulted to false
Attachment #385114 - Attachment is obsolete: true
Attachment #385382 - Flags: review?(bzbarsky)
Attachment #385381 - Flags: review?(mark.finkle)
Attachment #385382 - Flags: review?(bzbarsky) → review+
After a few more testing I thought there is more stuff we can add to the SelectHelper, for example scroll to the first selected item, or bind some keys to easily navigate in it.

I'm not already sure of the way to do for the key (listening onchange events, doing our own, ...). So, should I try to put all theses features in this bug or wait and open a new one once this one have land?
(In reply to comment #18)
> So, should I try to put all theses features in this bug or
> wait and open a new one once this one have land?

New bug
Comment on attachment 385381 [details] [diff] [review]
Js Part v0.5

Waiting for the C++ part to clear tests on mozilla-central before landing
Attachment #385381 - Flags: review?(mark.finkle) → review+
C++ part: http://hg.mozilla.org/mozilla-central/rev/13deae34bdb8
JS part: http://hg.mozilla.org/mobile-browser/rev/290bb7999608
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
The C++ part doesn't prevent the creation of a native widget for the popup, does it? As far as I can tell, nsCSSFrameConstructor::InitializeSelectFrame still gets all the way to nsWindow::Create (via view->CreateWidget).
bugspam
Assignee: nobody → 21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: