Skip to content

Dialog's window does not go away when no Scrim is set and initiallyVisible is true #128

@alexstyl

Description

@alexstyl

The following code will cause the app to freeze in place:

val state = rememberDialogState(initiallyVisible = true)

Dialog(state = state) {
    DialogPanel {

    }
}

the is because internally the window of the dialog is not dismissed, when the user taps away or presses escape, to dismiss the dialog.

As a workaround for now, use a Scrim() with full transparency:

val state = rememberDialogState(initiallyVisible = true)

Dialog(state = state) {
    Scrim(scrimColor = Color.Transparent)
    DialogPanel {

    }
}

I doubt anyone will ever face this issue, but it's worth raising in case anyone bumps into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions