Skip to content

Commit

Permalink
SearchBox: disable pointer events when is focused (#20951)
Browse files Browse the repository at this point in the history
* SearchBox: disable pointer events when is focused

* Change files

* fix hover behavior
  • Loading branch information
layershifter authored Dec 7, 2021
1 parent 35b607a commit d5d3ef6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "SearchBox: disable pointer events when is focused",
"packageName": "@fluentui/react",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 2 additions & 0 deletions packages/react/src/components/SearchBox/SearchBox.styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export function getStyles(props: ISearchBoxStyleProps): ISearchBoxStyles {
},
[`:hover .${classNames.icon}`]: {
opacity: 0,
pointerEvents: 'none',
},
},
},
Expand Down Expand Up @@ -167,6 +168,7 @@ export function getStyles(props: ISearchBoxStyleProps): ISearchBoxStyles {
},
hasFocus && {
opacity: 0,
pointerEvents: 'none',
},
!disableAnimation && {
transition: `opacity ${AnimationVariables.durationValue1} 0s`,
Expand Down

0 comments on commit d5d3ef6

Please sign in to comment.