From 26f5824005d31dffebd1235dc997088f7ee76754 Mon Sep 17 00:00:00 2001 From: Andre Weinand Date: Thu, 25 Aug 2016 15:24:53 +0200 Subject: [PATCH] fix dead-key issue on macOS --- src/vs/editor/common/controller/textAreaHandler.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/vs/editor/common/controller/textAreaHandler.ts b/src/vs/editor/common/controller/textAreaHandler.ts index aa6cbcd0be8..ee8ad3804c0 100644 --- a/src/vs/editor/common/controller/textAreaHandler.ts +++ b/src/vs/editor/common/controller/textAreaHandler.ts @@ -159,7 +159,12 @@ export class TextAreaHandler extends Disposable { // Due to isEdgeOrIE (where the textarea was not cleared initially) // we cannot assume the text at the end consists only of the composited text - this.textAreaState = this.textAreaState.fromTextArea(this.textArea); + if (Browser.isEdgeOrIE) { + // In Chrome v49, the text at the time of the compositionend event is not really the final text + // for the mac dead key input method. + // N.B: This can be removed in Chrome v53 + this.textAreaState = this.textAreaState.fromTextArea(this.textArea); + } this.lastCompositionEndTime = (new Date()).getTime(); if (!this.textareaIsShownAtCursor) {