-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
In Chrome/Safari, iframe inside a modal makes the main window scroll when iframe src contains a hashbang #15349
Comments
Note: We absolutely don't support Windows Safari, and we only unofficially support Opera 12. |
@cvrebert yeah, didn't remembered plunkr, just copied/pasted: http://plnkr.co/edit/ph2j5xkCYNMbXGx3o1Nf?p=preview |
You appear to have posted a live example (http://run.plnkr.co/plunks/ph2j5xkCYNMbXGx3o1Nf/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:
You'll need to fix these errors and post a revised example before we can proceed further. (Please note that this is a fully automated comment.) |
Well the omission of the suggested code was intended cause it is unrelated, but I added it back anyway for consistency. |
You appear to have posted a live example (http://run.plnkr.co/plunks/ph2j5xkCYNMbXGx3o1Nf/), which is always a good first step. However, according to Bootlint, your example has some Bootstrap usage errors, which might potentially be causing your issue:
You'll need to fix these errors and post a revised example before we can proceed further. (Please note that this is a fully automated comment.) |
Weird, changes not detected, freezing the plunkr: http://plnkr.co/edit/ph2j5xkCYNMbXGx3o1Nf?p=preview |
I can confirm this on OS X Yosemite in Safari 8.0.3 and Chrome 40. Doesn't happen in Firefox. |
The problem isn't specifically Bootstrap-related. Here's a Bootstrap-free version of your Plunk that exhibits the same bug: http://plnkr.co/edit/bKBag3Tfs5QYvwywMk24?p=preview So this is definitely a browser bug rather than a Bootstrap bug. |
WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=148626 |
Window 7 x64
Chrome 39.0.2171.95 m
Description:
When changing the src of an iframe and that src contains a hashbang, the browser native scrolling makes the
top
window also be scrolled. I could reproduce when changing the src after a modal is shown and the body of the modal contains the iframe element.Reproducing
I couldn't manage to make it work in a JSfiddle and it seems the problem requires that the files are served through a server, so I prepared the steps to reproduce the issue (file contents below):
test.html
andinner.html
http://localhost:8000/test.html
What happens? The top window (the one containing the iframe) will scroll down when the iframe window jumps to the hashbang target.
It strongly feels like a browser issue, since it only happens on Windows 7 x64 in "Chrome 39.0.2171.95 m" (and "Safari 5.1.7 (7534.57.2)"), but I choose to report here because it may be related to the way bootstrap modals are built.
Doesn't happen on Windows 7 x64 in Firefox 34.0, IE 11.0.9600.17501 and Opera 12.16 build 1860.
Files
They are all self contained, put them in the same directory (or use the plunkr below).
test.html
inner.html
http://plnkr.co/edit/ph2j5xkCYNMbXGx3o1Nf?p=preview
The text was updated successfully, but these errors were encountered: