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
When enabling inPageLinks during initialization, the anchor links work but the back button takes you to the previous page (the page in your history before the page that contains the iframe)
Expected behavior:
Take you to the previous spot on the parent page where the link was clicked.
Workaround:
I added the following to the child page to add the hash to the parent page history. I also added the class "samepagelink" to make assigning the javascript easier. This adds the same hash from the child page link to the parent page history.
document.addEventListener("DOMContentLoaded", function() {
var elements = document.getElementsByClassName("samepagelink");
Array.from(elements).forEach(function (anchor) {
anchor.addEventListener("click", function (event) {
window.parent.location.hash = anchor.hash;
});
});
});
The text was updated successfully, but these errors were encountered:
When enabling inPageLinks during initialization, the anchor links work but the back button takes you to the previous page (the page in your history before the page that contains the iframe)
Expected behavior:
Take you to the previous spot on the parent page where the link was clicked.
Workaround:
I added the following to the child page to add the hash to the parent page history. I also added the class "samepagelink" to make assigning the javascript easier. This adds the same hash from the child page link to the parent page history.
The text was updated successfully, but these errors were encountered: