mirror of
https://github.com/flarum/framework.git
synced 2025-04-24 21:54:04 +08:00
Prevent browser/system shortcuts from triggering when applying editor style from shortcut (#32)
This commit is contained in:
parent
153138c770
commit
8111b5a56c
@ -41,6 +41,7 @@ const applyStyle = (id) => {
|
||||
function makeShortcut(id, key) {
|
||||
return function (e) {
|
||||
if (e.key === key && (e.metaKey && modifierKey === '⌘' || e.ctrlKey && modifierKey === 'ctrl')) {
|
||||
e.preventDefault();
|
||||
applyStyle(id);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user