Closed Bug 165093 Opened 22 years ago Closed 22 years ago

Selected OPTION items do not retain style in drop down menus after release

Categories

(Core :: Layout: Form Controls, defect, P3)

PowerPC
macOS
defect

Tracking

()

RESOLVED DUPLICATE of bug 79107
mozilla1.3alpha

People

(Reporter: nikd, Assigned: john)

Details

Attachments

(3 files, 1 obsolete file)

Consider a dropdown menu using SELECT and OPTION in a FORM. If a style is associated with such an OPTION, the style is shown in the dropdown menu. However, if an OPTION is selected, the associated style is not retained when releasing the mouse. Forthcoming attachment will illustrate this. Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1) Gecko/20020826
Attached file Test case (obsolete) (deleted) —
This is a dropdown menu with three OPTION items, using the style attributes bold, italic and small-caps respectively.
Attached file Test case (deleted) —
This is a dropdown menu with three OPTION items, using the style attributes bold, italic and small-caps respectively.
to form controls. The style shown when the dropdown is collapsed is the style of the _select_, and I see no reason it should be otherwise...
Assignee: dbaron → jkeiser
Component: Style System → HTML Form Controls
QA Contact: ian → tpreston
The obvious reason is that each option can have its own style, wheras select only can have one. Consider an option with lang="zh" and another option with lang="en", and it becomes somewhat more obvious. New test case: put Hebrew text in one option and English in another. What bidi algorithm will be applied to the _collapsed_ select element? This is reversed inheritance, and it really must be so. Or do you really reverse the Hebrew text, applying ltr? Another testcase: Suppose I have a list with mainly English elements and one (or more) with Chinese text? The Chinese text should be rendered with a bigger point size, due to its complicated nature, and I would also like it to be rendered with the font Cyberbit. The English elements would be rendered using Lucida Grande or another Western font. What happens in the collapsed select? Try http://homepage.mac.com/nikd/dvd/alien/ for a real world example. There's a Chinese title at the bottom of the dropdown. In the future, I expect things to get even worse... all those Bollywood productions, all the Russian classics, some Iranian master pieces in Farsi... A workaround would be using optgroups with style, but the damn thing doesn't work well with Mozilla. I think this is a style issue.
Attachment #96966 - Attachment mime type: text/plain → application/xml
Note: XML testcase isn't well-formed. So the point here is that the styles aren't displayed on the closed menu?
Comment on attachment 96966 [details] Test case Yes, that is the point. (I mistakenly sent plain/text and thought I stopped it in time; it is text/html as in the second attachment.)
Attachment #96966 - Attachment is obsolete: true
Attachment #96966 - Attachment mime type: application/xml → text/html
Chinese is here rendered illegible and unantialiased when collapsing. It doesn't look very pretty. From the HTML spec: "The SELECT element creates a menu. Each choice offered by the menu is represented by an OPTION element. A SELECT element must contain at least one OPTION element." The SELECT element is thus just the containing box (that could be styled with borders and such), and if one or more OPTION elements are visible, collapsed or not, they should retain the style at all times. This becomes more obvious if the SELECT element has the attribute "multiple" attached to it, because then we have a list box with several OPTION elements visible at all time. The drop-down menu is just a special compact case where only one OPTION is visible in the collapsed state. That particular OPTION should thus retain its style.
Attached file Test case with <SELECT size="2"…> (deleted) —
Here, the style for each OPTION is retained at all times. Yet, the only difference is in the size attribute of the SELECT element. Inconsistent.
I intend to rewrite the select display anyway. This bug came at an opportune time. And it is definitely valid.
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → mozilla1.3alpha
yeah, but..... *** This bug has been marked as a duplicate of 79107 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: