fix(#2355): correctly reset Dialog’s returnValue (#2356)
Some checks are pending
Test & Docs / tests (postgresql, 3.10) (push) Waiting to run
Test & Docs / tests (postgresql, 3.12) (push) Waiting to run
Test & Docs / lint (push) Waiting to run
Test & Docs / docs (push) Waiting to run

Fixes #2355
This commit is contained in:
Yohan Boniface 2024-12-10 13:33:00 +01:00 committed by GitHub
commit c15ecfc29f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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) {