From b91a5cb198e8b0ada143d69155bce60bac8e4e83 Mon Sep 17 00:00:00 2001 From: nightwing Date: Fri, 7 Apr 2023 15:03:53 +0400 Subject: [PATCH] safari fires composition event before keydown --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index 2eeb01f..9bfa25f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -266,6 +266,9 @@ const vimPlugin = ViewPlugin.fromClass( } }); }, + compositionstart: function(e: Event, view: EditorView) { + this.useNextTextInput = true; + }, keypress: function(e: KeyboardEvent, view: EditorView) { if (this.lastKeydown == "Dead") this.handleKey(e, view);