mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-01-18 08:50:52 +00:00
db080e29d3
This fix needs a little bit of explanation. Normally the 'keyUp' prevent is preferred because it fires after being sure, that not some buttons more belong to the shortcut. Additionally some platforms set the key-property of the 'keyDown'-event to the composition result of the key-combination thus resolving under certain environments to '€' while in other environments to 'e'. The browser's event flow is as following: keyDown -> keyPress -> textInput -> keyUp. As the keyUp-event is too late (after textinput) and the keyPress-event does not work properly with the modifiers, we felt compelled to use 'keyDown' and watch for 'e' as well as '€' key-properties. If some other keyboard locale does output different characters than these two, that person got a problem - meaning no functionality of the shortcut. But still better than nothing. |
||
---|---|---|
.. | ||
api | ||
components | ||
external-types | ||
redux | ||
style | ||
index.tsx | ||
react-app-env.d.ts | ||
service-worker.ts | ||
setup-tests.ts | ||
version.json |