-
-
Notifications
You must be signed in to change notification settings - Fork 983
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
Name anchors in iframe refresh entire parent page #806
Comments
Have you set the |
Yes, but with inPageLinks set to true the iframe does not scroll to the name anchor when clicked but at least the page doesn't refresh. This is the logger output as it appears to try and scroll but doesn't:
|
Well the log output is at least correct. Does the example work for you? just wondering if something else on your page is stopping the scrolling? |
The example appears to work on our browsers (Chrome, Safari) but I'm not sure if it exemplifies our issue as its iframe contents are small with no scrollbar. Clicking on the bottom link when the height calculation method is set to max does scroll down but that's the parent page. Our issue is that the iframe content, which has long content and renders a scrollbar, does not scroll when a name anchor inside that iframe content is clicked. |
Describe the bug
Name anchors present in a web page loaded into an iframe are reloading the entire parent page when clicked on.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Iframe should scroll to content where name anchor is located in framed page; no page refreshes should occur.
Desktop (please complete the following information):
Additional context
This seems similar to issue #68 but that was filed years ago and is closed. Sounds like iframe-resizer was updated to solve for this w/o requiring any extra code but for some reason we are experiencing this issue. The name anchors contained in our iframe content are relative with no targets. An example name anchor contained in our iframe:
<a href="#toc">Table of Contents</a>
<div id="toc">Table of Contents</div>
The text was updated successfully, but these errors were encountered: