diff --git a/packages/quill/src/modules/keyboard.ts b/packages/quill/src/modules/keyboard.ts index 3301046410..7941b370f5 100644 --- a/packages/quill/src/modules/keyboard.ts +++ b/packages/quill/src/modules/keyboard.ts @@ -173,6 +173,13 @@ class Keyboard extends Module { listen() { this.quill.root.addEventListener('keydown', (evt) => { if (evt.defaultPrevented || evt.isComposing) return; + + // evt.isComposing is false when pressing Enter/Backspace when composing in Safari + // https://bugs.webkit.org/show_bug.cgi?id=165004 + const isComposing = + evt.keyCode === 229 && (evt.key === 'Enter' || evt.key === 'Backspace'); + if (isComposing) return; + const bindings = (this.bindings[evt.key] || []).concat( this.bindings[evt.which] || [], );