Replies: 2 comments
-
I also have this issue, both firefox and chrome. My snippet is the following: const { Ctrl_K } = useMagicKeys();
whenever(Ctrl_K, () => {
dialog.value = true;
}); I didn't find a way to prevent default behaviour, is this expected and instead we should use |
Beta Was this translation helpful? Give feedback.
0 replies
-
Does this work? const keys = useMagicKeys({
passive: false,
onEventFired: (e) => {
if (keys['meta+k']) {
e.preventDefault();
}
},
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all, got a little dilemma with the following setup. Am implementing a key combo of meta (cmd) (or ctrl) + k to toggle the modal window. The code below works but in Firefox it also focuses on the URL bar.
Question: What would be the correct way to prevent that?
Beta Was this translation helpful? Give feedback.
All reactions