-
Notifications
You must be signed in to change notification settings - Fork 60
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
Fixes with umb-route-slot
inside routed modal
#2146
Conversation
# Conflicts: # src/packages/tiny-mce/vite.config.ts
Hi @enkelmedia I had a look at this one, there is clearly a problem. I did not manage to boil it down just jet. But its clear that the modal does not act correct. For starters it should go away when navigating browser history. |
Quality Gate passedIssues Measures |
# Conflicts: # src/packages/tiny-mce/vite.config.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @enkelmedia Thanks for this Example and highlighting this problem. I've debugged a bit more and corrected a few things and now things are stable. Thanks
Description
This provides a potential fix for the issue described here: umbraco/Umbraco-CMS#16834
I'm thinking that the problem might be that the event that is fired when the route changes fires before the
umb-route-slot
inside the modal has been loaded. I tried some hacks withsetTimeout
to trigger the "routes"-attribute to re-load the routes in the modal. This worked so i figured that maybe if we set the routes of the underlyingrouter-slot
when a new route is loaded it might solve the problem.I made a small change to the
firstUpdated
method ofUmbRouterSlotElement
and after this, the scenario that I was having trouble with works.Types of changes
Motivation and context
How to test?
I've also added a example-folder to the PR, so just run
And pick
modal routed
Checklist