Skip to content

Commit

Permalink
Merge pull request #48 from scheduleonce/pythons/ONCEHUB-75025-2
Browse files Browse the repository at this point in the history
fix : single select focus issue for Safari browser.
  • Loading branch information
oncehub-shubham authored Jan 21, 2025
2 parents c00111e + 6fa031f commit 058d978
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@oncehub/ui-react",
"private": false,
"version": "1.4.21",
"version": "1.4.22-beta.1.0",
"repository": {
"type": "git",
"url": "https://github.com/scheduleonce/once-ui-react"
Expand Down
14 changes: 14 additions & 0 deletions src/lib/components/select/auto-complete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,20 @@ export const AutoComplete: FC<Props> = ({
setIsFocused(false);
};

useEffect(() => {
const input = inputRef.current;
if (input) {
input.addEventListener('focus', handleFocus);
input.addEventListener('blur', handleBlur);
}
return () => {
if (input) {
input.removeEventListener('focus', handleFocus);
input.removeEventListener('blur', handleBlur);
}
};
}, [handleFocus, handleBlur]);

if (themeColor) {
const theme = luminance(themeColor);
themeColor = ColorsService.convert3HexTo6(themeColor);
Expand Down

0 comments on commit 058d978

Please sign in to comment.