From b94d025da44aeebd9651f46cfc4fe367cdd56a87 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 14 Dec 2015 15:21:22 -0800 Subject: PLT-1404 signal login to other tags --- web/templates/head.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'web/templates') diff --git a/web/templates/head.html b/web/templates/head.html index be4ed2b25..b39bbc291 100644 --- a/web/templates/head.html +++ b/web/templates/head.html @@ -68,6 +68,16 @@ console.log('detected logout from a different tab'); window.location.href = '/' + window.mm_team.name; } + + if (e.originalEvent.key === '__login__' && 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.isSignallingLogin(e.originalEvent.newValue)) { + return; + } + + console.log('detected login from a different tab'); + window.location.href = '/'; + } }); }); -- cgit v1.2.3-1-g7c22