Fixed hotkey menu option selection issues on Chrome.
[fa-stable.git] / js / inserts.js
index ca55cfa110e8e592c102e939abbd138d6f384005..2e14ebf4d75df58657fa68262b885a2e5c8c5f5b 100644 (file)
@@ -454,7 +454,8 @@ var inserts = {
                                        ev.returnValue = false;
                                        return false;
                                }
-                               window.location = e.href;
+                               if (!_hotkeys.alt)      // ommit chrome Chrome accesskeys 
+                                       window.location = e.href;
                        }
        },
        'ul.ajaxtabs':  function(ul) {
@@ -465,7 +466,8 @@ var inserts = {
 // ?  var modifiedurl=ulistlink.getAttribute("href").replace(/^http:\/\/[^\/]+\//i, "http://"+window.location.hostname+"/")
                    var url = tab.form.action
                    tab.onclick=function(){
-                       _expand(this);
+                   if (!_hotkeys.alt)
+                               _expand(this);
                        return false;
                    }
                }
@@ -538,7 +540,7 @@ function setHotKeys() {
                        for (var i=0; i<cnt; i++) { 
                                n = (n+1)%cnt;
                                // check also if the link is visible
-                               if (l[n].accessKey==key && l[n].scrollWidth) {
+                               if (l[n].accessKey==key && (l[n].offsetWidth || l[n].offsetHeight)) {
                                        _hotkeys.focus = n;
            // The timeout is needed to prevent unpredictable behaviour on IE.
                                        var tmp = function() {l[_hotkeys.focus].focus();};