[Webkit-unassigned] [Bug 37530] No default selection for <select multiple> menu lists.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Apr 14 18:22:48 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=37530





--- Comment #8 from Luiz Agostini <luiz.agostini at openbossa.org>  2010-04-14 18:22:47 PST ---
(In reply to comment #7)
> (From update of attachment 53368 [details])
> > This patch makes it possible for <select multiple> and <select size="n gt 1"> elements to have no selected option
> > when rendered as menu lists.
> 
> I don't quite understand what is the problem and how this patch solves it.
> Could you explain this in the ChangeLog too? You say "makes it possible" but
> why, and how?

The target here is to have exactly the same behavior with and without
NO_LISTBOX_RENDERING enabled. I mean, the very same <select> element in the
very same html file must have the very same selection after loading the page
with and without  NO_LISTBOX_RENDERING enabled.

The problem is that, for menu lists, if the selection is not indicated by the
html file the first <option> will be selected after loading the page or
reseting the form. Please consider bugzilla advanced search form:
https://bugs.webkit.org/query.cgi?format=advanced . When the page is loaded
many of its listboxes do not have a selected element (for example product,
component, version). But when NO_LISTBOX_RENDERING is enabled the listboxes
will became menu lists and then they will have an item selected after the page
is loaded. That is the behavior difference that this patch corrects.

As when NO_LISTBOX_RENDERING is enabled usesMenuList() always returns true
usesMenuList() cannot be used to decide about initial selection of the
elements. This patch replaces (usesMenuLists()) by (!multiple && size <= 1)
where initial selection is considered (methods recalcListItems and reset).

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list