Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dialog] Allow to set disableOutsidePointerEvents on DialogContent #2123

Conversation

lesha1201
Copy link
Contributor

Description

Handles #2122 (all the details there)

Let me know if I should add any tests or stories for that PR.

@lesha1201 lesha1201 changed the title Allow to set disableOutsidePointerEvents on DialogContent [Dialog] Allow to set disableOutsidePointerEvents on DialogContent May 1, 2023
@benoitgrelard
Copy link
Contributor

Hi @lesha1201,

I wouldn't make sense to turn this feature off whilst in modal mode thus why we preset a bunch of things based on modality.

Also see: #2122 (comment)

@Lexachoc
Copy link

Lexachoc commented Oct 26, 2024

When I have modal={true} (the default) and turned on forceMount, I can't click on the page because of this prop is set true, any idea how to overcome this? I saw the solution of using setTimeout to remove it later in here: #2122 (comment) but I wonder if it's possible to allow the expose of this prop that we can turn it off when using forceMount? I would like the pointer event to be disabled only when the Dialog is opened, just like the default behavior.

Issue with forceMount:
#998

Related issue about scrolling:
#1159
#2122

After altering the code, I was able to use the Dialog forceMount as expected, like the forceMount used for [Tabs] (https://www.radix-ui.com/primitives/docs/components/tabs#content), which I can use the class name (Tailwind) to change the visibility of the tabs instead of unmounting them.

But I stuck at the pointer event, which was forced to be added to the div when using forceMount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants