-
Notifications
You must be signed in to change notification settings - Fork 229
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
Iframe called twice (Chrome) #48
Comments
UPDATE: This appears to only affect Google Chrome! |
I am having the same problem however it happens in IE as well as Chrome. I can get rid of the problem by commenting out the appendTo('body'); section in the jquery.simplemodal-1.4.4.js but then the modal is not centered correctly when it is shown.
Any ideas on how to resolve this? |
@rollisoj This is how I resolved it. Remove and save the original Src before the data is first appended to the body var iframeElement = $(data.find('iframe')[0]);
var savedSrc = iframeElement.prop('src');
iframeElement.prop('src','about:blank');
s.d.data = data
... Right before data is appended to the wrap element, you can bring back the Src // Reinstate src
// IE10 will trigger a request on src prop update, remove from DOM
s.d.data.detach();
$(s.d.data.find('iframe')[0]).prop('src', savedSrc);
s.d.data.appendTo(s.d.wrap); |
I've been using this for sometime and have had no issues up until now.
I have an iframe within the modal dialog (with a loader image behind it whilst it loads in).
The iframe page is called twice (I can tell this server side). It appears related to onOpen, if onOpen is removed the the iframe only gets called once.
Great dialog by the way - very impressive I've found it very useful. If this can be resolved I'll be happy to donate.
The text was updated successfully, but these errors were encountered: