C
Chris Riesbeck
In Firefox, IE and Opera, with a select menu with size > 1, typing a few
characters in the menu selects an item and triggers the onchange event.
In the Webkit-based Safari and Google Chrome, the item appears to be
selected (visually and selectedIndex is set) but the onchange is not
triggered.
The W3C says "The onchange event occurs when a control loses the input
focus and its value has been modified since gaining focus."
http://www.w3.org/TR/REC-html40/interact/scripts.html
Doesn't that mean if you type to select then tab or click away from the
menu, the onchange should fire? This doesn't happen in Safari or Google
Chrome.
I can work around this with an onblur but is it me or Webkit not getting
this right?
Toy example at
http://www.cs.northwestern.edu/~riesbeck/demo/menutest.html
characters in the menu selects an item and triggers the onchange event.
In the Webkit-based Safari and Google Chrome, the item appears to be
selected (visually and selectedIndex is set) but the onchange is not
triggered.
The W3C says "The onchange event occurs when a control loses the input
focus and its value has been modified since gaining focus."
http://www.w3.org/TR/REC-html40/interact/scripts.html
Doesn't that mean if you type to select then tab or click away from the
menu, the onchange should fire? This doesn't happen in Safari or Google
Chrome.
I can work around this with an onblur but is it me or Webkit not getting
this right?
Toy example at
http://www.cs.northwestern.edu/~riesbeck/demo/menutest.html