You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug HTMLDialogElement.close() emits an close Event even when the dialog is already closed.
This behaviour differs from the implementation in Chrome or Firefox where calls to the close method on already closed dialogs don't trigger 'close' Events.
The returnValue IDL attribute, on getting, must return the last value to which it was set. On setting, it must be set to the new value. When the element is created, it must be set to the empty string.
To Reproduce
Steps to reproduce the behavior:
Create a closed Dialog-Element
Register a event handler to the close event
Call close() on the Dialog Element
The Handler shouldn't be called, but it get's called
Expected behavior
The close-Event shouldn't be emitted when the dialog is already closed
The text was updated successfully, but these errors were encountered:
Schleuse
changed the title
HTMLDialogElement.close() emits an close Event even when the dialog is already closed
HTMLDialogElement.close() emits a close Event even when the dialog is already closed
Sep 13, 2023
Schleuse
pushed a commit
to Schleuse/happy-dom
that referenced
this issue
Sep 13, 2023
Describe the bug
HTMLDialogElement.close()
emits an close Event even when the dialog is already closed.This behaviour differs from the implementation in Chrome or Firefox where calls to the
close
method on already closed dialogs don't trigger 'close' Events.The Spec says:
To Reproduce
Steps to reproduce the behavior:
close
eventclose()
on the Dialog ElementExpected behavior
The
close
-Event shouldn't be emitted when the dialog is already closedThe text was updated successfully, but these errors were encountered: