summaryrefslogtreecommitdiffstats
path: root/web/templates
diff options
context:
space:
mode:
authorhmhealey <harrisonmhealey@gmail.com>2015-12-03 15:00:20 -0500
committerhmhealey <harrisonmhealey@gmail.com>2015-12-03 15:00:20 -0500
commit0ec5db65a7d356d1df617d096d5dc1dd2e76fb0e (patch)
treecb3284040a108e1c2dc2289b632f5fc2205499eb /web/templates
parentffd5d554659816ac0fd24f1470fe7ee6dfe7ba50 (diff)
downloadchat-0ec5db65a7d356d1df617d096d5dc1dd2e76fb0e.tar.gz
chat-0ec5db65a7d356d1df617d096d5dc1dd2e76fb0e.tar.bz2
chat-0ec5db65a7d356d1df617d096d5dc1dd2e76fb0e.zip
Fixed IE11 tabs preventing themselves from logging out
Diffstat (limited to 'web/templates')
-rw-r--r--web/templates/head.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/web/templates/head.html b/web/templates/head.html
index c425ef0b0..40e01a90d 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -57,7 +57,13 @@
$(function () {
$(window).bind('storage', function (e) {
- if (e.originalEvent.key === '__logout__') {
+ // when one tab on a browser logs out, it sets __logout__ in localStorage to trigger other tabs to log out
+ if (e.originalEvent.key === '__logout__' && e.originalEvent.storageArea === localStorage && e.originalEvent.newValue) {
+ // make sure it isn't this tab that is sending the logout signal (only necessary for IE11)
+ if (window.BrowserStore.isSignallingLogout(e.originalEvent.newValue)) {
+ return;
+ }
+
console.log('detected logout from a different tab');
window.location.href = '/' + window.mm_team.name;
}