Skip to content
Snippets Groups Projects
Unverified Commit e6cc937a authored by syuilo's avatar syuilo
Browse files

Check meta key

parent 87091a2e
No related branches found
No related tags found
No related merge requests found
......@@ -59,7 +59,7 @@ export default {
el.dataset.reservedKeys = reservedKeys.map(key => `'${key}'`).join(' ');
el._keyHandler = e => {
el._keyHandler = (e: KeyboardEvent) => {
const key = e.code.toLowerCase();
const targetReservedKeys = document.activeElement ? ((document.activeElement as any).dataset || {}).reservedKeys || '' : '';
......@@ -72,7 +72,8 @@ export default {
const matched = pattern.which.includes(key) &&
pattern.ctrl == e.ctrlKey &&
pattern.shift == e.shiftKey &&
pattern.alt == e.altKey;
pattern.alt == e.altKey &&
e.metaKey == false;
if (matched) {
e.preventDefault();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment