Open AlexNasonov opened 8 years ago
This was the issue also reported at https://github.com/PolymerElements/app-route/pull/77#discussion-diff-63082376
This is intentional, as a gambit to reduce invisible dom changes on navigation. Quoting my response from the thread Tim links:
Consider the scenario where we've got three pages: /user
/user/:username/profile
and /watch/:videoId
with <user-page>
and <watch-page>
as top level siblings, and <user-page>
using tail
to delegate to a <user-profile-page>
.
When navigating from /user/alice/profile
to /watch/panda-sneeze
we have to do a certain amount of work to set up the panda-sneeze video. From a performance standpoint, it would be nice if we could do the minimum of changes inside <user-profile-page>
at the same time, as it's invisible to the user at that point.
It is a bit surprising, but it does give an almost-free performance win. If it does cause a lot of problems for people in practice though we can revisit the decision.
Maybe an opt-out could fix the issues? E.g. have the performance by default, but you can opt-out of it. I have been encountering this issue quite some times now :(
Description
Created app-location and app-route components:
Added a few buttons:
Created an observer:
Expected outcome
Click buttons one after another:
Actual outcome
Browsers Affected