From b00a3a0d1959388a834bd429c311b04d79a1f5dd Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 21 Feb 2015 16:05:07 +0530 Subject: [PATCH] add guards in case add/removeEventListener do not exist --- static/js/pandora.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/static/js/pandora.js b/static/js/pandora.js index 53fdfe84f..c75a88426 100644 --- a/static/js/pandora.js +++ b/static/js/pandora.js @@ -60,7 +60,7 @@ appPanel theme = legacyThemes[theme] || theme; - document.addEventListener('keydown', onKeydown); + document.addEventListener && document.addEventListener('keydown', onKeydown); loadImages(function(images) { loadScreen(images); @@ -433,7 +433,7 @@ appPanel Ox.Fullscreen.bind('exit', pandora.UI.set); pandora.site.sectionButtonsWidth = pandora.$ui.sectionButtons.width() + 8; loadUserScript && pandora.loadUserScript(); - document.removeEventListener('keydown', onKeydown); + document.removeEventListener && document.removeEventListener('keydown', onKeydown); } function loadBrowserMessage() {