Open Bug 1360755 Opened 7 years ago Updated 2 years ago

Keystrokes on <datalist> fire keyboard events on associated <input>

Categories

(Core :: DOM: Events, enhancement, P3)

54 Branch
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: lea, Unassigned)

References

(Blocks 1 open bug, )

Details

See testcase. Keystrokes for navigating in the <datalist> or selecting an entry are firing keyboard events on the <input>.

Chrome does not fire events for those, Edge has the same behavior as Firefox.

The behavior is undefined in the spec, and I plan to file a spec bug too. 

Firing those events on the input makes it impossible to distinguish them from "real" keystrokes. For example, you may want Enter on the input of a to-do list to insert an item, but that shouldn't happen if Enter is pressed to select a datalist option. There is currently no way to distinguish the former from the latter.
Related WHATWG issue: https://github.com/whatwg/html/issues/2605
Priority: -- → P3
Blocks: input-list
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.