Skip to content

Commit

Permalink
Don't trigger onMouseLeave for disabled elements (facebook#20966)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordyvandomselaar committed Mar 11, 2021
1 parent 7616771 commit ff3b079
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/react-dom/src/events/getListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function shouldPreventMouseEvent(
case 'onMouseMoveCapture':
case 'onMouseUp':
case 'onMouseUpCapture':
case 'onMouseLeave':
case 'onMouseEnter':
return !!(props.disabled && isInteractive(type));
default:
Expand Down

0 comments on commit ff3b079

Please sign in to comment.