fix(#2355): correctly reset Dialog’s returnValue

Fixes #2355
This commit is contained in:
David Larlet 2024-12-09 18:16:41 -05:00
parent d0156bc7a6
commit 5b32e2ac03
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD

View file

@ -78,7 +78,6 @@ export default class Dialog extends WithTemplate {
event.preventDefault()
this.dialog.returnValue = 'accept'
this.close()
this.dialog.returnValue = undefined
})
}
this.dialog.addEventListener('keydown', (e) => {
@ -143,6 +142,7 @@ export default class Dialog extends WithTemplate {
close() {
this.toggle(false)
this.dialog.returnValue = undefined
}
toggle(open = false) {