Skip to content

Commit 8f56e14

Browse files
committed
fix: don't navigate backwards when modal is open and close button is focused
1 parent 8b84f93 commit 8f56e14

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app/pages/settings.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ onKeyStroke(
1010
'Escape',
1111
e => {
1212
const target = e.target as HTMLElement
13-
if (!['INPUT', 'SELECT', 'TEXTAREA'].includes(target?.tagName)) {
13+
console.log(target)
14+
if (!['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(target?.tagName)) {
1415
e.preventDefault()
1516
router.back()
1617
}

0 commit comments

Comments
 (0)