Skip to content

Commit

Permalink
Toolbar plugin: Update UI on focus/blur events
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Joseph Ash committed Feb 28, 2014
1 parent 2394831 commit 86f751c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/scribe-plugin-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ define(function () {
// Unfortunately, there is no `selectionchange` event.
scribe.el.addEventListener('keyup', updateUi);
scribe.el.addEventListener('mouseup', updateUi);

scribe.el.addEventListener('focus', updateUi);
scribe.el.addEventListener('blur', updateUi);

// We also want to update the UI whenever the content changes. This
// could be when one of the toolbar buttons is actioned.
scribe.on('content-changed', updateUi);
Expand Down

0 comments on commit 86f751c

Please sign in to comment.