cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Chooser "Unable to Communicate With Parent Window" When Website Run as iOS Desktop Shortcut

Chooser "Unable to Communicate With Parent Window" When Website Run as iOS Desktop Shortcut

Russ K.1
New member | Level 1

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 5

Rich
Super User II

Moved to the API forum.

Steve M.
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.1
New 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.1
New 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.
Dropbox Staff

Great! Thanks for following up with what you found.

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Steve M. Dropbox Staff
  • User avatar
    Russ K.1 New member | Level 1
  • User avatar
    Rich Super User II
What do Dropbox user levels mean?