mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Check effectively if popup was blocked by browser
This commit is contained in:
committed by
GitHub
parent
5472cfd1c2
commit
aae2dd85e5
@@ -59,7 +59,7 @@ const openCenteredPopup = function(url, width, height) {
|
||||
|
||||
const newwindow = window.open(url, 'Login', features);
|
||||
|
||||
if (typeof newwindow === 'undefined') {
|
||||
if (newwindow || newwindow.closed) {
|
||||
// blocked by a popup blocker maybe?
|
||||
const err = new Error("The login popup was blocked by the browser");
|
||||
err.attemptedUrl = url;
|
||||
@@ -70,4 +70,4 @@ const openCenteredPopup = function(url, width, height) {
|
||||
newwindow.focus();
|
||||
|
||||
return newwindow;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user