-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Current way of matching hotkey with event.key property leads to broken hotkeys on Windows (Chrome, Vivaldi at least) as, for example with ru-RU locale on keybord hitting cmd+b will send event with key property set to cyrillic "и" and not "b".
First it was found in umputun/remark42#404
Images provided by @Andrew-Shtein prove difference in key prop


Issue located here:
markdown-toolbar-element/index.js
Lines 228 to 236 in dd0ffba
| function shortcut(toolbar: Element, event: KeyboardEvent) { | |
| if ((event.metaKey && modifierKey === 'Meta') || (event.ctrlKey && modifierKey === 'Control')) { | |
| const button = toolbar.querySelector(`[hotkey="${event.key}"]`) | |
| if (button) { | |
| button.click() | |
| event.preventDefault() | |
| } | |
| } | |
| } |
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working