Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Makes refocusing work #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/scribe-plugin-toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ define(function () {
* It is important that we focus the instance again before executing
* the command, because it might rely on selection data.
*/
scribe.el.focus();
setTimeout(function() {
scribe.el.focus();
}, 0);
command.execute(button.dataset.commandValue);
/**
* Chrome has a bit of magic to re-focus the `contenteditable` when a
Expand Down