add cancelNext function

This commit is contained in:
Nitwel
2020-09-28 20:14:01 +02:00
parent 57863547e9
commit 0000abab3b
2 changed files with 14 additions and 6 deletions

View File

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