From 9cc91414229706528961da0cc7f49d06e8b4ecae Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 12 Sep 2016 17:57:12 +0200 Subject: [PATCH] * all applications: Fix clicking on favorites in mobile template pops up logout prompt --- pixelegg/js/fw_mobile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pixelegg/js/fw_mobile.js b/pixelegg/js/fw_mobile.js index fa470b87d6..42e64fdfda 100644 --- a/pixelegg/js/fw_mobile.js +++ b/pixelegg/js/fw_mobile.js @@ -1044,7 +1044,7 @@ history.pushState({type:'main'}, 'main', '#main'); jQuery(window).on('popstate', function(e){ // Check if user wants to logout and ask a confirmation - if (e.originalEvent.state == null || typeof e.originalEvent.state == 'undefined') { + if (window.location.hash == '#main') { et2_dialog.show_dialog(function(button){ if (button === 3){ history.forward(); @@ -1054,7 +1054,7 @@ }, 'Are you sure you want to logout?', 'Logout'); } // Execute action based on - switch (e.originalEvent.state.type) + switch (e.originalEvent.state && e.originalEvent.state.type) { case 'popup': window.framework.popups[e.originalEvent.state.index].close(e.originalEvent.state.index);