diff options
author | friendica <info@friendica.com> | 2012-03-31 05:51:56 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-03-31 05:51:56 -0700 |
commit | c34a71eba64c111dcc8a2491355d0328fab41039 (patch) | |
tree | 1f506e4a33d9445a2ec7929cdc93d44a2cf3e119 /js | |
parent | d5a31e57918c9c183a959351fb3356636a2ddf6a (diff) | |
download | volse-hubzilla-c34a71eba64c111dcc8a2491355d0328fab41039.tar.gz volse-hubzilla-c34a71eba64c111dcc8a2491355d0328fab41039.tar.bz2 volse-hubzilla-c34a71eba64c111dcc8a2491355d0328fab41039.zip |
some js fixes - ignore backspace as history selector and cleanup errors closing non-existent menus
Diffstat (limited to 'js')
-rwxr-xr-x | js/main.js | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/js/main.js b/js/main.js index defd1f951..744691b6d 100755 --- a/js/main.js +++ b/js/main.js @@ -16,6 +16,7 @@ document.getElementById(theID).style.display = "none" } + var src = null; var prev = null; var livetime = null; @@ -88,10 +89,12 @@ return false; }); $('html').click(function() { - last_popup_menu.hide(); - last_popup_button.removeClass("selected"); - last_popup_menu = null; - last_popup_button = null; + if(last_popup_menu) { + last_popup_menu.hide(); + last_popup_button.removeClass("selected"); + last_popup_menu = null; + last_popup_button = null; + } }); // fancyboxes @@ -166,6 +169,12 @@ NavUpdate(); // Allow folks to stop the ajax page updates with the pause/break key $(document).keydown(function(event) { + if(event.keyCode == '8') { + var target = event.target || event.srcElement; + if (!/input|textarea/i.test(target.nodeName)) { + return false; + } + } if(event.keyCode == '19' || (event.ctrlKey && event.which == '32')) { event.preventDefault(); if(stopped == false) { |