iFrame interactions not working properly in WKWebView - javascript

iFrame interactions are not working in WKWebView. The same iFrames works on UIWebView and Safari.
What have I done so far:
Debugging webpage with Safari Web Inspector, Console does not display any message relevant to this issue
XCode Debugger does not show any message relevant to this issue
Found a similar post about the iFrame problem inside WKWebView https://forums.developer.apple.com/message/179394#179394

Related

Opening external application in iframe not working in Safari

I have a site embedded in an iframe from where I want to launch a mobile app. The following is bound to an onClick action on my button, and works in both Chrome and Firefox on my Android:
window.location = "scheme://app.com/?action=xxxxx"
However, when trying on Safari on iOS, nothing happens at all when clicking the button. If i go to the site directly (instead of iframing it) it works perfectly.
The same thing happens if I use an anchor tag:
I tried to fix this by using window.top.location, but then I run into Same-origin policy issues. The site that is hosting the iframe is on a different domain which I can't control.
Is there a workaround for this?

UIWebView incorrect display site, javascripts don't load after loading page

I use UIWebView in my app. And only one site load without css styles (only mobile version, with desktop all alright). I try load this site in Safari on my iOS device, all good. There is problem only with webView.
Doesn't help load with UIWebView LoadRequest method or transition to this page from full version of site.
Source code of this site has tag <noscript> and text from this tag shown on this webview.
It's look like something don't let download all scripts and styles, because in Chrome I looked source code of full loaded mobile site and it has more scripts, then page in WebView.
Moreover, I tried change UIWebView to the WKWebView, the problem remained. Also I use Xamarin.Forms and tried Forms.WebView - nothing. Is it a problem with code of site?

Contents inside an iframe don't load at all or a warning shows up - iframe src is unsecured and different domain that the containing page

I have a webpage from https://creator.zoho.com that contains an iframe. The iframe scr is http://somedomain.example.com (NOTE that it is not https). The iframe content contains scripts for JQuery, SignalR etc.
I get the following behavior across OS and browsers with their default security settings:
Windows
Internet Explorer - No issues, works fine.
Chrome - Does not load the iframe context at all (I see the DOM of iframe and it is empty). A shield icon appears on the right of the address bar and on click the message is "the page includes scripts from unauthenticated sources." I have an option "Load unsafe script". I click it and everything is works.
Firefox - Does not load anything in the iframe. No security indicator nor any warnings.
Safari - No issues, works fine.
Mac OS
Chrome - Does not load the iframe context at all (I see the DOM of iframe and it is empty). A shield icon appears on the right of the address bar and on click the message is "the page includes scripts from unauthenticated sources." I have an option "Load unsafe script". I click it and everything is works.
Firefox - Does not load the iframe context at all (I see the DOM of iframe and it is empty). A shield icon appears on the left of the address bar and on click the there is a security related message. I have an option "Load unsafe script". I click it and everything is works.
Safari - Does not load the iframe context at all. No security warning. No indication that something is blocked.
Does anyone have a clue as to what is wrong?
After a good amount of Googling, I can came across - https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options - but not very sure if this is a solution for my case for all browsers OR if it is even the right solution for any browser for the situation that I am facing.
Thanks in advance for reading my post.
My problem was resolved by moving the application (that was loading in the iframe) to HTTPS. So now the parent page and the iframe both are on HTTPS. They still on different domains, but both being HTTPS solved the issue for me.

Opening modal dialog window is not working in Chrome

Response To:
Opening Popup Window is not working in firefox and google chrome
Hi,I have similar code in above question.My code works fine in IE.
this.parent.window.showModalDialog('Counter.aspx', '',
'dialogHeight:170px;dialogWidth:150px;status:no;scroll:no;edge:sunken;toolbar:0;center:on;help:off;unadorned:yes;');
What can i do about this code in order to open this window in Google Chrome browser ?
Thanks for any assistance
Myra
showModalDialog works in chrome(its not truly modal though). the problem could be that it is blocking them. Chrome's minimalistic design doesnt even tell you that some times. try adding an exception for you current website.
you can find it under -
Options->Under The Hood Tab-> Content Settings Button -> Popups Tab -> Exceptions button

Javascript problem in Chrome and Safari

I have a Javascript image switcher on my products page. It working perfect in IE and Firefox but both Safari and Chrome fails to load the script on some pageloads. A refresh seems to fix it but when changing product page or language it crashes.
The product page
Im using Wordpress and the script is varal.org/media/imageswitcher/
Thanks!
Anton
I did not experience any issues in either Chrome or Safari for Windows on your product page. Try this in Chrome, to check if the two scripts (imageswitcherconf.js and imageswitcher.js) are being loaded:
Press Ctrl+Shift+J to open the JavaScript Console/Developer Tools window.
Click the Resources tab on the top of the window.
Enable resource tracking/script debugging if you have to.
With the JavaScript Console/Developer Tools window still open, perform an operation that would normally trigger a crash, such as switching languages.
On the left side of the window, under the Resources heading, you should see imageswitcherconf.js followed by imageswitcher.js. (For me, they appeared fourth and fifth in the list, respectively.)
If the files aren't being loaded:
Are you behind a caching proxy?
Is your browser cache clear?

Categories