]> cat aescling's git repositories - mastodon.git/commit
Ignore keyevents during text composition (#7205)
authorunarist <m.unarist@gmail.com>
Fri, 20 Apr 2018 16:36:52 +0000 (01:36 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 20 Apr 2018 16:36:52 +0000 (18:36 +0200)
commit84214b864c63aee08357a719ab386b8e4ed5b901
tree1bf4fb44822e8f1fa0b9bedab66ef811bef49220
parent87e3f0a41d2a2d223c663365a199c01989afc8ed
Ignore keyevents during text composition (#7205)

KeyboardEvent.key may be physical key name (Escape, Tab, etc.)
even in text composition and it causes hotkeys or suggestion selection.
So we need to check e.which or e.isComposing.

Checking e.which also allows us to avoid Esc key on compositionend in Safari.
app/javascript/mastodon/components/autosuggest_textarea.js