We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
Russ K.1
11 years agoNew member | Level 1
Chooser "Unable to Communicate With Parent Window" When Website Run as iOS Desktop Shortcut
I have a website I am developing which includes dropbox "chooser" functionality. Everything was working great in all of my testing so far, but when I created a shortcut to the website on the iOS desktop, dropbox chooser broke. The behavior I'm seeing now is when I click the button which invokes chooser, I immediately see the "unable to communicate with parent window" message at the login screen. It allows me to log in and navigate to the file I wish to select, but when I actually try to select it, I again see the "unable to communicate with parent window" message, and I'm unable to continue.
Because the dropbox functionality works fine when the website is viewed in the "normal" Safari browser, but not when Safari is launched via the iOS desktop shortcut, I'm thinking this is an issue which you need to look into, rather than something I messed up on my end. Here's the code I have in my web page, which is pretty vanilla:
<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="MYKEYHERE"></script>
On my button I have the following:
function startDropboxProcess() {
Dropbox.choose({
success: function(files) {
// Do something with the returned file
},
cancel: function() {
hidePleaseWait();
},
linkType: "direct",
multiselect: false,
extensions: ['.pdf'],
});
}
The iPad tells me it is running iOS 8.3. I can't seem to find what version of Safari it's using.
5 Replies
Replies have been turned off for this discussion
- Rich11 years ago
Super User II
Moved to the API forum.
- Steve M.11 years ago
Dropbox Staff
I'm not aware of a way to work around this issue. If we're blocked from communicating between the two browser windows, then the Chooser can't function.
- Russ K.111 years agoNew member | Level 1
@Steve M, that's a bummer. So, just to clarify, is the issue essentially that when Dropbox chooser is run in a "normal" Safari browser it opens as a popup, but when chooser is run from within a "desktop shortcut" version of Safari it opens as an entirely new window?
- Russ K.111 years agoNew member | Level 1
FYI, this problem went away when I removed the following meta tag from my HTML:
<meta name="apple-mobile-web-app-capable" content="yes" />
It seems that meta tag not only hides some of the Safari UI, it also forces it into "standalone" mode which makes it act differently than the normal Safari browser. My application depends on DropBox integration, so I'd rather have that working and lose some screen real estate, than have a nice full screen app that doesn't work.
- Steve M.11 years ago
Dropbox Staff
Great! Thanks for following up with what you found.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!