Skip to content

Commit

Permalink
Check that login window opens (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorbitzer authored and kirill-konshin committed Jan 3, 2017
1 parent fdc7fd2 commit c47e69d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/platform/Platform.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ Platform.prototype.loginWindow = function(options) {
var top = ((height / 2) - (options.height / 2)) + dualScreenTop;
var win = window.open(options.url, '_blank', (options.target == '_blank') ? 'scrollbars=yes, status=yes, width=' + options.width + ', height=' + options.height + ', left=' + left + ', top=' + top : '');

if(!win) {
throw new Error('Could not open login window. Please allow popups for this site');
}

if (win.focus) win.focus();

var eventMethod = window.addEventListener ? 'addEventListener' : 'attachEvent';
Expand Down

0 comments on commit c47e69d

Please sign in to comment.