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 Jan 29, 2019
1 parent 77f6176 commit 4a1fc6f
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 4a1fc6f

Please sign in to comment.