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

auto hide modals on 'back' navigation #535

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

geommr
Copy link
Contributor

@geommr geommr commented Mar 31, 2022

fixes #446

@keerifox
Copy link
Member

keerifox commented May 3, 2022

sorry only noticed this PR a short time ago,

does this prevent navigation or only hides the modals? per issue #446:

Right now pressing "Back" goes back in navigation history, but if there's a modal open, that "Back" action should close the modal instead (no URL must change)

@geommr
Copy link
Contributor Author

geommr commented Jun 24, 2022

My bad I must have missed this. The second commit should prevent navigation now

@keerifox
Copy link
Member

hmm i wonder if there's a cleaner way to solve it

the modal might become closed via numerous ways (clicking off-screen, proceeding with action etc.) and even if we listen to modal events ( https://getuikit.com/docs/modal#javascript ) to catch 90% of them, it feels like we may still have undesired effects by adding fake history state

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.

Pressing "Back" should close the visible modal
2 participants