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

Modal: Disable backdrop click #1488

Closed
boomfly opened this issue May 12, 2023 · 3 comments
Closed

Modal: Disable backdrop click #1488

boomfly opened this issue May 12, 2023 · 3 comments
Labels
feature request Request a feature or introduce and update to the project.

Comments

@boomfly
Copy link

boomfly commented May 12, 2023

Describe what feature you'd like. Pseudo-code, mockups, or screenshots of similar solutions are encouraged!

Is there a way to disable closing modal on backdrop click?

What type of pull request would this be?

None

Any links to similar examples or other references we should review?

No response

@boomfly boomfly added the feature request Request a feature or introduce and update to the project. label May 12, 2023
boomfly added a commit to boomfly/skeleton that referenced this issue May 12, 2023
Add disable closing modal on backdrop click skeletonlabs#1488
boomfly added a commit to boomfly/skeleton that referenced this issue May 12, 2023
Feature disable closing modal on backdrop click skeletonlabs#1488
@Sarenor
Copy link
Contributor

Sarenor commented May 12, 2023

No:
https://www.skeleton.dev/utilities/modals#accessibility

@matthme
Copy link

matthme commented May 23, 2024

I don't see how this feature would be disallowed by the accessibility guidelines you are pointing to. They state

and in some implementations, attempts to interact with the inert content cause the dialog to close

Note how they write "in some implementations".
There are cases where pressing a button in a modal triggers actions that take a while to complete and closing the dialog during that time would mess up with the application state so close on side-click should be disabled for all users during that limited amount of time. How else should such a case be handled?

@Sarenor
Copy link
Contributor

Sarenor commented May 24, 2024

By building your own Modal or using a dedicated page because some implementations include ours.

You might have more luck in v3, but for v2 the stance is set and won't change to not break backwards compatibility and expectations: Backdrop Clicks will close the modal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a feature or introduce and update to the project.
Projects
None yet
Development

No branches or pull requests

3 participants