]> cat aescling's git repositories - mastodon.git/commit
Fix Esc hotkey behavior (#7199)
authorunarist <m.unarist@gmail.com>
Fri, 20 Apr 2018 12:04:16 +0000 (21:04 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 20 Apr 2018 12:04:16 +0000 (14:04 +0200)
commit4e35ce82691dff9cd81dae2f0e2f566f6f3ef85c
tree9f8934e507c20989492d30e4490498f9929b9dc8
parent6f63cbb53c6ba7a5e2224c4bf846ccff1cac6a3d
Fix Esc hotkey behavior (#7199)

This fixes following cases which causes hotkey action accidentally:

* hitting Esc key to cancel text composition (mostly in CJK)

  Although events on cancelling composition are still heavily
  browser / input method dependent, but this implementation would
  covers current UI Events spec and some exceptions.

* hitting Esc key to close autocomplete suggestions

This PR changes to use keydown event instead of keyup event as well as other hotkeys.
app/javascript/mastodon/components/autosuggest_textarea.js