Skip to content

disable dialog closing when click outside of dialog #1751

@oliverkan

Description

@oliverkan

Discussed in #1700

Originally posted by oliverkan July 21, 2022
Hi, I am trying to find a way to make dialog persistent on screen. I mean I need to disable the closing feature of dialog when the user clicks somewhere outside of the dialog. I tried the static prop but it didn't help. I read the solution alternatives in this discussion. They mention about a tailwind class for pointer events but in new version Dialog.Overlay is deprecated. And also I don't want to loose esc key functionality if I have an empty onclose function. Is there any new, better way to solve this problem or should I have an empty onClose function and implement esc keydown event listener?

Thanks and regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions