NEW9599
native <select size=1> control should allow icons in the menu
https://bugs.webkit.org/show_bug.cgi?id=9599
Summary native <select size=1> control should allow icons in the menu
Timothy Hatcher
Reported 2006-06-26 04:40:57 PDT
The new select control should allow icons to be added to the popup menu. This would allow for more rich content and let developers leverage this control more. This could be expressed in CSS like: option:before {      content: url(myCoolIcon.png); } I could use this in Drosera to make the function and file popup have icons like Xcode.
Attachments
Reduction to show images and styled fonts on select box widgets (5.05 KB, application/octet-stream)
2007-08-20 06:51 PDT, Aaron Rosenzweig
no flags
Timothy Hatcher
Comment 1 2006-06-26 04:50:32 PDT
See bug 9600 for a more complex request to allow font styles in the menu.
Dave Hyatt
Comment 2 2006-06-26 11:55:43 PDT
I think there's a CSS3 ::icon pseudo.
Aaron Rosenzweig
Comment 3 2007-08-20 06:51:33 PDT
Created attachment 16031 [details] Reduction to show images and styled fonts on select box widgets This reduction works in Firefox but does not work in Safari 3.0.3 (2nd v3 beta). "Browser" widgets should be able to have their fonts colored, styled (bold, italics), and also allow more general compliance with CSS such as the use of images. This reduction shows all these features working in Firefox but not in Safari. When I say "Browser" I'm using WebObjects lingo but I mean the "select" tag with embedded "option" tags. Some people call this a popup, or dropdown, but it can also have a fixed size and show more than one option at a time with a scroll bar. From what I can tell, the only styling we can do on "browser" widgets in Safari is just coloring the text.
Wim Leers
Comment 4 2008-10-05 15:29:34 PDT
dhyatt explained me in IRC (http://drupal.org/node/180691#comment-1044691) that this will not be supported until WebKit stops using native Mac OS X menus. Firefox draws the widgets itself, which allows it to support this.
Ahmad Saleem
Comment 5 2022-06-24 09:53:46 PDT
I am able to reproduce this bug in Safari 15.5 on macOS 12.4, I changed attached test case in following JSFiddle: Link - https://jsfiddle.net/enh5oz9f/show NOTE - I use free image hosting solution, if in future "PNG" picture get deleted or gone then just update URL in HTML and CSS to new PNG and it will work. All other browser renders "tick mark" png next to options. Thanks!
Note You need to log in before you can comment on or make changes to this bug.