Skip to content

Commit

Permalink
fix(ui5-input): remove initial tabindex 0 from suggestions
Browse files Browse the repository at this point in the history
FIXES: #9340
  • Loading branch information
MapTo0 committed Dec 4, 2024
1 parent 0ac5ce0 commit 0d2c925
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/main/src/SuggestionItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ class SuggestionItem extends ListItemBase implements IInputSuggestionItemSelecta
this.setAttribute("desktop", "");
}
}

onBeforeRendering(): void {
super.onBeforeRendering();

// list's item navigation always sets tabIndex to 0 to first item
this.forcedTabIndex = "-1";
}
}

SuggestionItem.define();
Expand Down
7 changes: 7 additions & 0 deletions packages/main/src/SuggestionItemCustom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ class SuggestionItemCustom extends ListItemBase implements IInputSuggestionItemS
*/
@slot({ type: Node, "default": true, invalidateOnChildChange: true })
content!: Array<Node>;

onBeforeRendering(): void {
super.onBeforeRendering();

// list's item navigation always sets tabIndex to 0 to first item
this.forcedTabIndex = "-1";
}
}

SuggestionItemCustom.define();
Expand Down

0 comments on commit 0d2c925

Please sign in to comment.