I have installed and configured the Colorbox Module for Drupal on my mobile site. Everything works correctly, except when a user opens the site from their homescreen in an iPhone. The Colorbox opens briefly, then closes. This does not occur when a user is viewing the mobile version of the site on their iPhone in Safari. It only happens after they have added it to their homescreen and view it through that.
Turns out the following script was causing the error. This script prevents links from opening in Mobile Safari. https://gist.github.com/1042026
<script>(function(a,b,c){if(c in b&&b[c]){var d,e=a.location,f=/^(a|html)$/i;a.addEventListener("click",function(a){d=a.target;while(!f.test(d.nodeName))d=d.parentNode;"href"in d&&(d.href.indexOf("http")||~d.href.indexOf(e.host))&&(a.preventDefault(),e.href=d.href)},!1)}})(document,window.navigator,"standalone")</script>
Related
I'm currently experiencing an issue with links in an iframe. This links have multiple redirects (ads links).
The iframe is usually placed in a domain that is different from mine. When a user with an iphone (using safari) lands on this page and clicks one of the link I provide, it's redirected to a blank page.
This does not happen with chrome or firefox, but only with safari and only with iphones. With chrome and firefox the user is redirected to the correct page.
Moreover, and this is really weird, if on safari I press the link and do one of the following options, "Open" or "Open in a new tab", the redirect works perfectly.
There is some policy in safari that blocks the redirects? both sites are under ssl?
This is how I render links:
Thank you very much!
I wish to play flash content in iPad app so i searched lot then finally i came to know Puffin browser will play flash content.
In my app when user tapping a button the app redirected to puffin browser then it will play the flash content. then again if try to re-open my app from puffin browser i could not re-open it.
I created URL Scheme for my app. after completion of flash video, i tried to open my app by using myApp:// in puffin browser but it does not re-open my app. if try same way in safari its working.
Please help me
External URL opening will be supported in the next version. Do you mean you want to manually type "MyApp://SomeUrl" in Puffin and then open MyApp with SomeUrl? Is your app free to download? I'd like to give it a trial.
ps: I work in CloudMosa which sells Puffin.
Maybe a bit late, but there a several documentated URL Schemes on the Puffin Developer Page: https://www.puffinbrowser.com/development/
Puffin Browser for iOS handles the following URL Schemes.
puffin for http
puffins for https
puffin-x-callback for callbacks back to calling app (iOS after version 3.5)
i.E. use instead of https://www.google.de the Url puffins://www.google.de to open https://www.google.de in the Puffin Browser.
Unfortunately currently workin only for the not longer maintained iOS Versions Puffin and Puffin Pro. The new browser Puffin Lite has afaik no documentated URL Schemes or does it?
I created a Facebook "Tab App" that appears to be working in Chrome, Safari and FireFox but doesn't seem to load at all in IE8 (and older).
Here is the link to the tab on Facebook:
https://www.facebook.com/lapalomaacademy/app_190322544333196
I also uploaded the code to a page outside of Facebook, and IE8 seems to load that page fine (you can also view the source code on this page):
http://lpatucson.org/facebook/nonfans.html
Any ideas what the issue could be?
I have a mobile web site built using jQuery Mobile. I often run it in full screen/mobile web app mode on my iPhone (I have added the web app to my iPhone home screen).
On one of the pages, the user is required to log in to Facebook using the Facebook Connect JavaScript API. If the user is not already logged in, this is done by clicking a login button. The event handler for this button looks like this:
("#fbLogin").click(function () {
FB.login(handleStatusChange(response),
{ scope: "publish_stream",
connect_display: "touch" });
});
In the above code I have inserted some line breaks for better readability, but the values are like in the example. The callback function (handleStatusChange) takes care of the response from the login request.
When I click this, the Facebook login page is opened in my web app window. If I haven't already accepted the Facebook App, I have to give it permissions as well. All this seems to work fine. But after I have given permissions/logged in I'm left hanging on a totally blank screen.
I have also tried another approach to logging in, by putting this inside the login button event handler:
window.location = "https://www.facebook.com/login.php
?api_key=MY_API_KEY
&cancel_url=http%3A%2F%2Fwww.mywebsiteurl.com%3A8081
&fbconnect=1
&next=http%3A%2F%2Fwww.mywebsiteurl.com%3A8081
&return_session=1
&session_version=3
&v=1.0
&req_perms=publish_stream
&connect_display=touch";
Again, line breaks have been inserted for better readability. When used it's just one long string.
The URL used in the cancel_url and next parameters is the one I have registered with the Facebook Application. If I try using a different URL (like http://www.google.com) I get an error so the this seems to be correct. As you can see I use a different port on my development server (port 8081). Could this be a problem?
The result is similar to the previous example. I get the login/permissions pages but I'm left with a blank screen after everything is done. I tried this after reading this post on the old Facebook Developer forum.
If I, on the other hand, try running this in Safari (not as a full page iPhone web app) the login works great.
Is there anything else I can try? Does anyone have a JavaScript API Facebook Connect login working while running in full screen/web app mode on an iPhone?
Thanks in advance!
Not sure if this helps you, but I found that adding the iOS Safari link fix, also allowed Facebook login to work in my fullscreen web app without opening up the page i "regular" Safari:
// Make links work in iOS fullscreen web app
function disableSafariLinks() {
$("a").click(function (event) {
event.preventDefault();
window.location = $(this).attr("href");
});
}
See also iPhone Safari Web App opens links in new window
I'm having a problem with a Facebook application that I'm doing. The idea of my work is to make an iframe application that registers and login automatically into a mediawiki webpage that I have on the same server.
All that work is already done, but right now when I'm logged in to mediawiki after entering the app, when I click on create, or edit that article, it's not working. After clicking the link the web stays static, like no clicks were done.
In fact, the problem occurs with all Special: pages from mediawiki, all the others links works properly.
In chrome when I Ctrl+click and open in a new tab, everything works fine, but for my app requested I needed to stay into the iFrame.