mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
fix(tree-view): make first focusable node tabbable regardless of active/selected states
This commit is contained in:
parent
9e5adfa986
commit
48d4c0ba37
1 changed files with 5 additions and 7 deletions
|
@ -81,14 +81,12 @@
|
|||
}
|
||||
|
||||
onMount(() => {
|
||||
if ($activeNodeId !== $selectedNodeIds[0]) {
|
||||
const firstFocusableNode = ref.querySelector(
|
||||
"li.bx--tree-node:not(.bx--tree-node--disabled)"
|
||||
);
|
||||
const firstFocusableNode = ref.querySelector(
|
||||
"li.bx--tree-node:not(.bx--tree-node--disabled)"
|
||||
);
|
||||
|
||||
if (firstFocusableNode != null) {
|
||||
firstFocusableNode.tabIndex = "0";
|
||||
}
|
||||
if (firstFocusableNode != null) {
|
||||
firstFocusableNode.tabIndex = "0";
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue