Quellcode durchsuchen

避免tabindex为-1的元素干扰读屏

任一存 vor 3 Jahren
Ursprung
Commit
86559b2389
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      web/src/utils.js

+ 1 - 1
web/src/utils.js

@@ -185,7 +185,7 @@ function __focusNextFocusableNode(treeWalker) {
     }
     if (nextNode.focus) {
       nextNode.focus()
-      if (document.activeElement === nextNode) {
+      if (document.activeElement === nextNode && nextNode.tabIndex !== -1) {
         return true
       }
     }