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 authored and shaunandrews committed Jun 11, 2020
1 parent 1523539 commit 92caa88
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 92caa88

Please sign in to comment.