disable dialog closing when click outside of dialog
See original GitHub issueDiscussed in https://github.com/tailwindlabs/headlessui/discussions/1700
<div type='discussions-op-text'>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.</div>
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Disable click outside of angular material dialog area to close ...
In the method that opens the dialog, pass in the following configuration option disableClose as the second parameter in MatDialog#open() and set ...
Read more >How To Prevent MatDialog From Closing When Clicked Outside
How To Prevent MatDialog From Closing When Clicked Outside ; export ; constructor(private dialogRef: MatDialogRef<ConfirmComponent>){ ; dialogRef.
Read more >Disable click outside dialog. (not closing the dialog) #2380
I could not figure out how to disable click outside... I only want the user to close/cancel the dialog by clicking on the...
Read more >How to Disable MUI Dialog Backdrop Clicks - Smart Devpreneur
I was able to disable the Backdrop close on click by using the Dialog's onClose handler. We can't disable it directly in the...
Read more >Dialog / How To / Close Dialog when click outside of its region
Close Dialog when click outside of its region in Angular Dialog component ... By default, dialog can be closed by pressing Esc key...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@RobinMalfait thanks for your quick answer. Is there any workaround or alternative way to disable outside click?
Same situation here