Closed Bug 470341 Opened 17 years ago Closed 15 years ago

deleteAttribute("size") on <select size="1"> does not revert list box to combo-box

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: rektide, Unassigned)

References

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.16) Gecko/20080716 Firefox/2.0.0.16 Build Identifier: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.16) Gecko/20080716 Firefox/2.0.0.16 Deleting the size attribute of a SELECT does not revert the listbox to a combobox. Since some web frameworks (including JSF) always append a size="1", dom manipulation of the size attribute would be the only work-around to [ this bug https://bugzilla.mozilla.org/show_bug.cgi?id=470338 ]. However there appears to be no DOM way to change a select between list and combo state. Reproducible: Always Steps to Reproduce: <select id="state" size="1"> <option>AL</option><option>AK</option><option>AS</option> </select> <script type="text/javascript"> //<![CDATA[ document.getElementById("state").deleteAttribute("size"); //]]> </script> Actual Results: Javascript does nothing Expected Results: DOM manipulation turns listbox SELECT into a combo/menubox SELECT. https://bugzilla.mozilla.org/show_bug.cgi?id=470338 relates to a <SELECT size="1"/> rendering as a un-usable listbox, prompting me to need this workaround. However I dont see why DOM manipulation shouldnt allow a <SELECT> box to change between list & combo state.
similarly, document.getElementById("state").size= 0; document.getElementById("state").size= null; do not alter the state of the SELECT.
There is no "deleteAttribute" method. Try removeAttribute?
Depends on: 470338
Component: General → DOM: Core & HTML
Product: Firefox → Core
QA Contact: general → general
As Jesse said, there is no deleteAttribute. Some testing doesn't seem to reveal the bug you're mentioning. If there is still a bug in Firefox 4, please reopen and provide a test case.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.