Skip to content

Commit

Permalink
Block switch: ensure hover is reset when style changed (#12317)
Browse files Browse the repository at this point in the history
When a block style is selected we should reset the hover state so that any component using this will be adjusted accordingly
  • Loading branch information
johngodley authored and youknowriad committed Mar 6, 2019
1 parent e446a12 commit e133168
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/editor/src/components/block-styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ function BlockStyles( {
function updateClassName( style ) {
const updatedClassName = replaceActiveStyle( className, activeStyle, style );
onChangeClassName( updatedClassName );
onHoverClassName( null );
onSwitch();
}

Expand Down

0 comments on commit e133168

Please sign in to comment.