Skip to content

Commit

Permalink
Fix problem with chrome 55
Browse files Browse the repository at this point in the history
  • Loading branch information
ivank committed Dec 22, 2016
1 parent 1fc4375 commit f208250
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "popup-tools",
"version": "1.0.0",
"version": "1.0.1",
"description": "Popups with callbacks, post and data response",
"main": "lib/PopupTools.js",
"repository": {
Expand Down
10 changes: 6 additions & 4 deletions src/PopupTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ function popupExecute(execute, url, name, options, callback) {
if (win) {
interval = setInterval(function closePopupCallback() {
if (win == null || win.closed) {
clearInterval(interval);
if (!isMessageSent) {
popupCallback(new Error('Popup closed'));
}
setTimeout(function delayWindowClosing () {
clearInterval(interval);
if (!isMessageSent) {
popupCallback(new Error('Popup closed'));
}
}, 500);
}
}, 100);
} else {
Expand Down

0 comments on commit f208250

Please sign in to comment.