Use second param instead of augmenting system event

This commit is contained in:
rijkvanzanten
2020-09-29 18:26:30 -04:00
parent 72fc6aee9c
commit b7ab31b33d
2 changed files with 56 additions and 51 deletions

View File

@@ -33,10 +33,10 @@ export default defineComponent({
},
setup(props, { emit }) {
const dialog = ref<HTMLElement | null>(null);
useShortcut('escape', (event) => {
useShortcut('escape', (event, cancelNext) => {
if (_active.value) {
emitToggle();
event.cancelNext();
cancelNext();
}
});