-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(TableToolbarSearch): support back-tab (#3836)
This change fixes the issue with `<TableToolbarSearch>` that happens when the `<input>` in it has focus and user performs back-tab gesture (Shift-Tab key). In such scenario (in before-change version), the root element of `<TableToolbarSearch>` (`<div class="bx--toolbar-search-container-expandable">`) gets focus given it has `tabindex="0"`, and the `onFocus()` handler of the element attempts to send focus back to the `<input>` no matter what. This change also fixes the following found in the debugging effort: * An issue where `id` of `<Search>` in `<TableToolbarSearch>` is regenerated for every render * Issues focus on `<input>` happening: * For every render, regardless of change in expanded state * Even for controlled change in expanded state (without user gesture) Fixes #3762.
- Loading branch information
Showing
2 changed files
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters