Skip to content

Commit

Permalink
Only add listeners in navigation mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Jun 8, 2020
1 parent e725d11 commit 56bd95a
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,9 @@ const BlockComponent = forwardRef(
onKeyDown={ isSelected && ! isLocked ? onKeyDown : undefined }
// Only allow selection to be started from a selected block.
onMouseLeave={ isSelected ? onMouseLeave : undefined }
onMouseOver={ onMouseOver }
onMouseOut={ onMouseOut }
// No need to have these listeners for hover class in edit mode.
onMouseOver={ isNavigationMode ? onMouseOver : undefined }
onMouseOut={ isNavigationMode ? onMouseOut : undefined }
tabIndex="0"
style={ {
...( wrapperProps ? wrapperProps.style : {} ),
Expand Down

0 comments on commit 56bd95a

Please sign in to comment.