Closed bobharley closed 6 years ago
It closes the browser tab even with e.preventDefault() and/or e.stopPropagation() Is there a way to override this behavior?
e.preventDefault()
e.stopPropagation()
hotkeys.add({ combo: 'mod+w', description: 'Close tab', allowIn: ['INPUT', 'SELECT', 'TEXTAREA'], callback: (e, hotkey) => { e.preventDefault() e.stopPropagation() // code here } })
No. Browsers don't let you prevent users from closing tabs, windows or the browser application itself using keyboard shortcuts for security and usability reasons.
It closes the browser tab even with
e.preventDefault()
and/ore.stopPropagation()
Is there a way to override this behavior?