Skip to content

Commit

Permalink
[wtf] Fix Chromium onBlur shenanigans
Browse files Browse the repository at this point in the history
- blur event was firing before the click event on the options - reverse was true for Firefox
  • Loading branch information
cee-chen committed Apr 15, 2024
1 parent 51f951a commit b400a4d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-docs/src/views/selectable/selectable_sizing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ const SelectableInputPopover = () => {
setIsSearching(true);
},
onKeyDown: (event) => {
if (event.key !== 'Escape') setIsOpen(true);
if (event.key === 'Tab') return setIsOpen(false);
if (event.key !== 'Escape') return setIsOpen(true);
},
onClick: () => setIsOpen(true),
onFocus: () => setIsOpen(true),
onBlur: () => setIsOpen(false),
}}
isPreFiltered={isSearching ? false : { highlightSearch: false }} // Shows the full list when not actively typing to search
listProps={{
Expand Down

0 comments on commit b400a4d

Please sign in to comment.