Skip to content

Initially open dialog with closedby can be broken #10982

Open
@lukewarlow

Description

@lukewarlow

What is the issue with the HTML Standard?

Given the following markup:

<dialog open closedby="any">
  Dialog
</dialog>

The expected behaviour of a developer will probably be that the dialog is opened and supports close requests and light dismiss to close the open dialog. However, this is not the case.

The dialog won't be added to the document's open dialogs list nor will the dialog's close watcher be established. So the closedby attribute will have effectively no effect.

This also has the effect that calling requestClose() on a dialog in this state, would fail the assetion on step 2 that it's close watcher is not null.

Assertions are comments but this does mean step 6 is a null reference exception.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions