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

Fix click handling in Modal #442

Merged
merged 1 commit into from
Feb 15, 2022
Merged

Conversation

tkieft
Copy link
Contributor

@tkieft tkieft commented Feb 14, 2022

When using sveltestrap w/ SvelteKit, stopping propagation of the click event in modals breaks SvelteKit's handling of that click event, and so you get a full browser navigation, rather than a navigation within the single-page web app.

To repro this, build a modal with a link in the modal body.

What we actually want here is to stop propagation of the event only if it's a click on the backdrop that we handle.

Copy link
Owner

@bestguy bestguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah great, thanks for the catch/fix

@bestguy bestguy merged commit 93bce73 into bestguy:master Feb 15, 2022
@bestguy
Copy link
Owner

bestguy commented Feb 15, 2022

Thanks, will release patch this week. This may fix #436 as well, but will confirm

@tkieft tkieft deleted the fixClickHandling branch March 21, 2022 16:34
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.

2 participants