Commit 9099f077 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #547 from hypothesis/oauth-popup-polish

Adjust the preferred initial size of the OAuth popup window.
parents b8537760 02138367
......@@ -326,8 +326,15 @@ function auth($http, $rootScope, $window,
});
// Authorize user and retrieve grant token
var width = 400;
var height = 400;
// In Chrome & Firefox the sizes passed to `window.open` are used for the
// viewport size. In Safari the size is used for the window size including
// title bar etc. There is enough vertical space at the bottom to allow for
// this.
//
// See https://bugs.webkit.org/show_bug.cgi?id=143678
var width = 475;
var height = 430;
var left = $window.screen.width / 2 - width / 2;
var top = $window.screen.height /2 - height / 2;
......
......@@ -535,7 +535,7 @@ describe('sidebar.oauth-auth', function () {
fakeWindow.open,
'about:blank',
'Login to Hypothesis',
'height=400,left=312,top=184,width=400'
'height=430,left=274.5,top=169,width=475'
);
var authPopup = fakeWindow.open.returnValues[0];
assert.equal(authPopup.location.href, expectedAuthUrl);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment