Skip to content

Commit 673993c

Browse files
committed
select markers KaiOS
1 parent 313e052 commit 673993c

9 files changed

+126
-134
lines changed

application/assets/js/helper.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,15 @@
33
import { status, settings } from "../../index.js";
44

55
export let setTabindex = () => {
6-
let visibleElements = document.querySelectorAll(
7-
'.item:not([style*="display: none"])'
6+
console.log("run");
7+
const elements = document.querySelectorAll(".item");
8+
9+
let visibleElements = Array.from(elements).filter(
10+
(element) => getComputedStyle(element).display !== "none"
811
);
912

1013
visibleElements.forEach((element, index) => {
11-
if (getComputedStyle(element).display !== "none") {
12-
element.setAttribute("tabindex", index);
13-
} else {
14-
element.removeAttribute("tabindex");
15-
}
14+
element.tabIndex = index;
1615
});
1716
};
1817

0 commit comments

Comments
 (0)