ngDropbox
ngDropbox copied to clipboard
popUp IE11
Hi, i've noticed that IE11 has some problems with the popUp for authenticate because opener.postMessage function doesn't work well on IE11. I have already created alternative to this if you are interested.
For the callback script :
window.addEventListener('load', function () {
var pageUrl = window.location.href;
window.opener.postMessagePassthrough(pageUrl);
window.close();
});
For the dropbox.js authenticate function :
authenticate : function () {
var self = this,
deferred = $q.defer(),
authUrl = urls.authorize + '?client_id=' + clientId + '&response_type=token' + '&redirect_uri=' + redirectUri;
$window.postMessagePassthrough = function (s) {
var response = queryParamsFromUrl(s);
if (response.access_denied || response.error) {
deferred.reject(response);
} else if (response.access_token) {
oauth = self.oauth = response;
deferred.resolve(oauth);}
}
$window.open(authUrl, '_dropboxOauthSigninWindow', popupSize(700, 500));
}