Web Bug Track - A place to track Web bugs... in JavaScript, DOM, CSS, XHTML, HTML in all Web Browsers... Firefox, Internet Explorer, Safari, Chrome, Opera, Konqueror and more.
In testing (bug 487) we found that Safari consistently became unstable and crashed if you tried to modify the options of a select list while the select list was open by using the onkeydown or onkeypress event (onkeyup won't crash (but doesn't work either)).
A test case is provided below, but be warned, this will crash Safari! so be sure you don't have anything in another tab that you need to save.
(and for the record, this bug/crash report has been sent to Safari)
Try the following sample out, and come back soon! ;-)
Example: (open the list, and "Press Any Key") OnKeyDown Test:
Example: (open the list, and "Press Any Key") OnKeyPress Test:
The option element is used inside a select element to provide options for the user to select from. Like all visually displayed elements in the browser, you can attach event handlers to them too.
Well, not quite. The following table indicates the level of support for each browser, and event.
Event
Firefox
Internet
Explorer
Konqueror
Opera
Safari
Chrome
onclick
Yes
No
?
Yes
No (v4.0 Yes!)
No (v2.0 yes!)
onmouseover
Yes
No
?
No (v9.5 Yes!)
No (v4.0 Yes!)
No (v2.0 yes!)
onmouseout
Yes
No
?
No (v9.5 Yes!)
No (v4.0 Yes!)
No (v2.0 yes!)
onmousedown
Yes
No
?
No (v9.64 Yes!)
No (v4.0 Yes!)
No (v2.0 yes!)
onmouseup
Yes
No
?
No (v9.64 Yes!)
No (v4.0 Yes!)
No (v2.0 yes!)
keyup
No
No
?
No
No
No
keydown
No
No
?
No
No
No
keypress
No
No
?
No
No
No
Only Firefox seems to support the full array of mouse events, Opera is next supporting an onclick event, but in IE and Safari(win) there is no support for mouse events on options.
Oddly enough, no browser seems to support keyboard events on options.
View the following samples in Firefox, Safari or Opera and IE.
Feb. 7,2009 - Added a new Tag called Broken By Design. It is applied to all reported bugs that the browser vendor has indicated that they have no intention of fixing this bug any time soon and is therefore broken "By Design".
Feb. 7,2009 - Updated as many bug reports as possible for Internet Explorer 8 (IE8) to reflect the status of IE8 RC1 since according to the IE Blog the RTM release is coming soon. If you want to know, click to see what has been fixed?
Drag/Right-Click and save to your Bookmarks
View generated source of a page in IE View Source
Show Rendering Mode for IE6/7 Render Mode
Show Rendering Mode for IE8 IE8 Render Mode
Show how many style tags a page has # style tags