Add @keydown.esc="dialog = false"
to componentv-dialog
<v-dialog v-model="dialog" @keydown.esc="dialog = false"></v-dialog>
data: () => ({
dialog: false
}),
Working example: https://codepen.io/anon/pen/BJOOOQ
In addition, if you use the dialog as a custom component, then perhaps we need to throw an input event:
<template>
<v-dialog :value="value" @keydown.esc="$emit('input')">
...
Traxo source
share