Open masayuki-nakano opened 5 years ago
I used the order proposed here in my draft Key event handling algorithm doc:
https://docs.google.com/document/d/1LJQvjEmWZGzVgZnofpvdkxMj1hEnLniD72XD4DLJWx4/edit?usp=sharing
This doc is still an early draft, but please feel free to review and comment
Ccing @garykac
Currently, UI Events defines event order of "keypress" event is:
keydown
beforeinput
keypress
input
keyup
However, both Chrome and Safari uses this event order:
keydown
keypress
beforeinput
input
keyup
Even for Firefox, the latter event order makes sense too because Firefox implements each user operation in editor is a default action of
keypress
event. So, if Firefox needs to conform to current draft's event order, Mozilla need to rewrite event handling a lot.So, both backward compatibility with Chrome/Safari and for implementing
beforeinput
quicker on Firefox, I'd like to suggest that the event order should be changed in the UI Events.