Skip to content

Commit

Permalink
[material-ui] Fix: [Tooltip] When wrapping an input which is disabled…
Browse files Browse the repository at this point in the history
… while focused an error is thrown #45373

Updated code based on the suggestion

Signed-off-by: Sarathkumar <[email protected]>
  • Loading branch information
sarathkumarsasi authored Feb 27, 2025
1 parent a85cdb7 commit 35e60c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/mui-material/src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,8 +478,8 @@ const Tooltip = React.forwardRef(function Tooltip(inProps, ref) {

const [, setChildIsFocusVisible] = React.useState(false);
const handleBlur = (event) => {
if (!isFocusVisible(event.target)) {
setChildIsFocusVisible(false);
setChildIsFocusVisible(false);
if (event && !isFocusVisible(event.target)) {
handleMouseLeave(event);
}
};
Expand Down

0 comments on commit 35e60c9

Please sign in to comment.