]> git.mxchange.org Git - friendica.git/commitdiff
some js fixes - ignore backspace as history selector and cleanup errors closing non...
authorfriendica <info@friendica.com>
Sat, 31 Mar 2012 12:51:56 +0000 (05:51 -0700)
committerfriendica <info@friendica.com>
Sat, 31 Mar 2012 12:51:56 +0000 (05:51 -0700)
js/main.js

index defd1f951ae6ec194437122d2a92eb9d9360f8c2..744691b6da5dd971de36bc189f172b4141d85eb8 100755 (executable)
@@ -16,6 +16,7 @@
       document.getElementById(theID).style.display = "none" 
   }
 
+
        var src = null;
        var prev = null;
        var livetime = null;
                        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
                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) {