question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

disable dialog closing when click outside of dialog

See original GitHub issue

Discussed 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:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
oliverkancommented, Aug 9, 2022

@RobinMalfait thanks for your quick answer. Is there any workaround or alternative way to disable outside click?

0reactions
aayardevcommented, Dec 7, 2022

Same situation here

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found