Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
From a UX perspective I have noticed that a lot of my users (especially people who favor the keyboard) will begin typing, choose a term and then when they notice the highlighted input that is waiting for the next term they hit ESC on the keyboard. This keypress should be treated just like clicking the mouse off the widget.
Comment | File | Size | Author |
---|---|---|---|
#1 | keydown-2012742.patch | 454 bytes | bleen |
Comments
Comment #1
bleen CreditAttribution: bleen commentedIt turns out that the reason ESC was not working for me is that keypress does not get fired for ESC (or backspace) because for some reason Chrome does not fire keypress for some keys but it does fire keydown
this patch solves the bug
Comment #2
sepgil CreditAttribution: sepgil commentedI recently changed that line from keydown to keypress because of this issue #1626980: Can't enter specific letter. So we'll have to find another way to fix this.
Comment #3
bleen CreditAttribution: bleen commentedBased on the definition here: http://unixpapa.com/js/key.html keypress should be used only for characters and keydn should be used for all keys ...
I would argue that its actually the other issue that needs to be revisited since the fix there broke this...
Should I move this discussion to that issue?
Comment #4
sepgil CreditAttribution: sepgil commentedWhat we should do, is move the backspace stuff into a keydown function and leave the comma/delimiter key stuff in keypress
I think it's okay if we discuss that in here.