diff --git a/src/modules/keyboard.coffee b/src/modules/keyboard.coffee index 2b1b75d831..8118d80f99 100644 --- a/src/modules/keyboard.coffee +++ b/src/modules/keyboard.coffee @@ -58,6 +58,7 @@ class Keyboard _.each(leaf.formats, (value, format) => @quill.prepareFormat(format, value) @toolbar.setActive(format, value) if @toolbar? + return ) return false ) diff --git a/test/unit/modules/keyboard.coffee b/test/unit/modules/keyboard.coffee index 538bf6ff6c..460d361533 100644 --- a/test/unit/modules/keyboard.coffee +++ b/test/unit/modules/keyboard.coffee @@ -66,5 +66,19 @@ describe('Keyboard', -> dom(@quill.root).trigger('keydown', Quill.Module.Keyboard.hotkeys.OUTDENT) expect(@quill.root).toEqualHTML('