Site Navigation

Showing posts with label onkeypress. Show all posts
Showing posts with label onkeypress. Show all posts

Saturday, February 28, 2009

bug 318 - press any key to... crash Safari

Issue: #318
Affects: Safari 3.1, 4.0 Beta
Fixed In: Safari 5.0

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:


Known Workarounds: None.



Related Issues: (bug 280), (bug 487).


Bug/Site Feedback |
Submit a bug

Thursday, July 17, 2008

bug 249 - you can't press Tab in IE and capture it

Issue: #249
Affects: IE6, IE7, IE8, IE9, IE10, Safari 4 Beta, Chrome 5,6,7

Believe it or not, you can't capture the keypress event for the Tab key in IE (any version).

Are you serious? I hear you ask... well, lets make proving this fun.

In the following textarea, type in any key... you'll get $5* for any key, but you'll get $2,500* for pressing the Tab key.

Example:
Winnings!
$


You can make a boatload of cash in Firefox, Safari, Opera and Konqueror but you'll never get a $2,500 payout in IE.


Known Workarounds: None. If you want to capture the Tab key, you'll need to capture the keydown and keyup events instead.



*All currency is of the imaginary non-legal currency type.

Related Issues: None.


Bug/Site Feedback |
Submit a bug

Wednesday, November 14, 2007

bug 280 - lack of events for options

Issue: #280
Affects: IE5, IE5.5, IE6, IE7, IE8, IE9 PP4, IE9 RC 1, Opera, Safari 3, Safari 4 Beta, Chrome v1, ?
Partially Fixed in: Opera 9.5-9.64 (onclick, onmouseover, onmouseout, onmousedown, onmouseup fixed!)
Partially Fixed in: Safari 4.0 (onclick, onmouseover, onmouseout, onmousedown, onmouseup fixed!)
Partially Fixed in: Chrome 2.0 (onclick, onmouseover, onmouseout, onmousedown, onmouseup fixed!)


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.












EventFirefoxInternet
Explorer
KonquerorOperaSafariChrome
onclickYesNo?YesNo (v4.0 Yes!)No (v2.0 yes!)
onmouseoverYesNo?No (v9.5 Yes!)No (v4.0 Yes!)No (v2.0 yes!)
onmouseoutYesNo?No (v9.5 Yes!)No (v4.0 Yes!)No (v2.0 yes!)
onmousedownYesNo?No (v9.64 Yes!)No (v4.0 Yes!)No (v2.0 yes!)
onmouseupYesNo?No (v9.64 Yes!)No (v4.0 Yes!)No (v2.0 yes!)
keyupNoNo?NoNoNo
keydownNoNo?NoNoNo
keypressNoNo?NoNoNo


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.

Example:






Known Workarounds: None.

Related Issues: bug 291.