You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has been several reports about clicking hyperlinks does not give the expected behaviour. We have two specific scenarios:
create two .html files and create a link to move from one to the other. When you now change the code and save it refreshes the index.html file instead of the one you are on. Can not see the addressbar reflecting moving between HTML files at all
Create hyperlinks with hashes pointing to IDs of elements on the page. The expected behaviour is that the preview window jumps to the element when you click the link. This does not happen
app/sandbox-hooks/url-listeners.js is the file that is responsible for intercepting URL changes and send them up to the addressbar (sendUrlChange). We still need this logic, but we want to re-evaluate the click listener further down in the file.
So I would suggest doing normal tracking here instead. One for popstate and one for hashchange:
There has been several reports about clicking hyperlinks does not give the expected behaviour. We have two specific scenarios:
create two
.html
files and create a link to move from one to the other. When you now change the code and save it refreshes theindex.html
file instead of the one you are on. Can not see the addressbar reflecting moving between HTML files at allCreate hyperlinks with hashes pointing to IDs of elements on the page. The expected behaviour is that the preview window jumps to the element when you click the link. This does not happen
app/sandbox-hooks/url-listeners.js
is the file that is responsible for intercepting URL changes and send them up to the addressbar (sendUrlChange
). We still need this logic, but we want to re-evaluate the click listener further down in the file.So I would suggest doing normal tracking here instead. One for
popstate
and one forhashchange
:https://gomakethings.com/how-to-detect-when-the-browser-url-changes-with-vanilla-js/
https://stackoverflow.com/questions/6390341/how-to-detect-if-url-has-changed-after-hash-in-javascript/37091484#37091484
The text was updated successfully, but these errors were encountered: