Skip to content

Commit

Permalink
Force focus on editor when toggling format
Browse files Browse the repository at this point in the history
Since clicking the format button will cause focus to be moved out of
the editor. Ensuring focus will cause nodeChange to be triggered with
parent according to format applied.

See: 2ef33e2
  • Loading branch information
aduth committed Apr 26, 2017
1 parent ea5a642 commit 0958fe8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions blocks/components/editable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ export default class Editable extends wp.element.Component {
}

toggleFormat( format ) {
this.editor.focus();

if ( this.isFormatActive( format ) ) {
this.editor.formatter.remove( format );
} else {
Expand Down

0 comments on commit 0958fe8

Please sign in to comment.