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

Make 'container' element follow 'overlay' rather than being nested within it #8

Merged

Conversation

Holf
Copy link
Contributor

@Holf Holf commented Feb 17, 2024

This is a workaround for an issue in the underlying micromodal library, present in version 0.4.10.

Upgrading from 0.4.8 to 0.4.10 is desirable, as it fixes an issue where a click to dismiss the Overlay propagates through to any underlying clickable elements.

This should fix #6.

Further notes on the changes are added as inline PR comments.

package.json Show resolved Hide resolved
src/lib/Modal.svelte Show resolved Hide resolved
src/lib/Modal.svelte Show resolved Hide resolved
@robinmetral
Copy link
Owner

This looks great @Holf, thanks a lot! I need a bit of time (couple of weeks maximum) to give this a review and merge it — I'll get to it as soon as I can. Sorry!

In case you're in a rush, you should (I think) be able to already use this in your projects (assuming you're using npm or similar) by switching the dependency to:

- "svelte-micromodal": "^0.0.8"
+ "svelte-micromodal": "Holf/svelte-micromodal#6-make-overlay-and-container-peer-elements"

@Holf
Copy link
Contributor Author

Holf commented Feb 19, 2024

Cool, and no rush at all. 👍

@robinmetral
Copy link
Owner

Thanks a lot for your contribution @Holf, and thanks for your patience! This looks great — releasing the new version to npm in a minute 🙂

@robinmetral robinmetral merged commit c0aaead into robinmetral:main Mar 2, 2024
@Holf
Copy link
Contributor Author

Holf commented Mar 2, 2024

Thank you, and no problem at all. Pleasure doing business with you. 😎

Do let me know if you spot any issues with it.

@robinmetral
Copy link
Owner

I will! Likewise if you spot any other issues with the library 🙂

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.

Update to version 0.4.10 of micromodal
2 participants