Close the inbox if the background page is refreshed
This commit is contained in:
parent
36319d6458
commit
0ac323961b
1 changed files with 6 additions and 0 deletions
|
@ -94,6 +94,12 @@
|
|||
height: 440 // 420 for chat
|
||||
}, function (windowInfo) {
|
||||
inboxWindowId = windowInfo.id;
|
||||
|
||||
// close the panel if background.html is refreshed
|
||||
window.addEventListener('beforeunload', function () {
|
||||
// TODO: reattach after reload instead of closing.
|
||||
extension.windows.remove(windowInfo.id);
|
||||
});
|
||||
});
|
||||
} else if (inboxOpened === true) {
|
||||
extension.windows.focus(inboxWindowId);
|
||||
|
|
Loading…
Reference in a new issue