Bug 18337 - Multiline <select> don't fire onchange events when typing-to-select
Summary: Multiline <select> don't fire onchange events when typing-to-select
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2008-04-06 17:41 PDT by Anthony Ricaud
Modified: 2008-06-06 14:13 PDT (History)
3 users (show)

See Also:


Attachments
Testcase (678 bytes, text/html)
2008-04-06 17:42 PDT, Anthony Ricaud
no flags Details
Proposed patch (1.17 KB, patch)
2008-06-02 06:58 PDT, Anthony Ricaud
no flags Details | Formatted Diff | Diff
Patch with LayoutTest (3.65 KB, patch)
2008-06-03 16:14 PDT, Anthony Ricaud
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Ricaud 2008-04-06 17:41:14 PDT
When typing the name of an option, the onchange event is never fired. Even after defocusing the <select> element. The event fires using up and down arrows.

Steps to Reproduce:
1) Select the "aaaaa" option. "aaaaa" is written in the console.
2) Hit the down arrow. "bbbbb" is written in the console.
3) Hit the "c" key. "ccccc" is NOT written in the console.
4) Unfocus the <select> element. "ccccc" is NOT written in the console.

Spec : http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-eventgroupings-htmlevents
Even if the specs says that the event should fire when the element loses the focus, other browsers are firing the event each time a new row is selected.
Comment 1 Anthony Ricaud 2008-04-06 17:42:22 PDT
Created attachment 20374 [details]
Testcase
Comment 2 Anthony Ricaud 2008-06-02 06:58:06 PDT
Created attachment 21461 [details]
Proposed patch

I think this is the right place to fire this event but i'm not really confident.
However, the testcase and the original application are fixed with this patch.
Comment 3 Anthony Ricaud 2008-06-03 16:14:46 PDT
Created attachment 21487 [details]
Patch with LayoutTest

Added some tests thanks to Alexey Proskuryakov.
Comment 4 Eric Seidel (no email) 2008-06-06 14:13:41 PDT
http://trac.webkit.org/changeset/34405