Browse Source

新媒体矩阵样式聚焦取消tab键

zwq 2 years ago
parent
commit
b0b932454a
1 changed files with 6 additions and 5 deletions
  1. 6 5
      nngkxxdp/src/main/resources/static/xmtjz/index.html

+ 6 - 5
nngkxxdp/src/main/resources/static/xmtjz/index.html

@@ -468,11 +468,6 @@
         }
     }
     function openDetail(index, name) {
-        // $("#messageDialogT").addEventListener('keydown', (e) => {
-        //     if(e.keyCode == 9){ // 禁用tab按键
-        //         e.preventDefault();
-        //     }
-        // });
         var tapsTitleLi = $('.third .list .wxInfo');
         var left = index % 6;
         var top = parseInt(index / 6);
@@ -481,6 +476,12 @@
             $("#messageDialogT").addClass("click");
             $("#messageDialogT").css("display", "block");
             $("#messageDialogT").focus();
+            document.onkeydown=function(event){
+                var e = event || window.event || arguments.callee.caller.arguments[0];
+                if(e && e.keyCode==9){
+                    e.preventDefault();
+                }
+            };
             $("#messageDialogT").css("top", (top*200) + "px");
             $("#messageDialogT").css("left", (250 + left*220) + "px");
             if (left >= 4) {