From f18957d16e00a47c1b1050f7fd9e1089272ca4dd Mon Sep 17 00:00:00 2001 From: jahorton Date: Wed, 8 May 2019 13:02:42 +0700 Subject: [PATCH] Reverts change that broke context persistence. --- ios/engine/KMEI/KeymanEngine/Classes/TextField.swift | 2 +- ios/engine/KMEI/KeymanEngine/Classes/TextView.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/engine/KMEI/KeymanEngine/Classes/TextField.swift b/ios/engine/KMEI/KeymanEngine/Classes/TextField.swift index 1e4b308e75..425c5506c9 100644 --- a/ios/engine/KMEI/KeymanEngine/Classes/TextField.swift +++ b/ios/engine/KMEI/KeymanEngine/Classes/TextField.swift @@ -167,7 +167,7 @@ public class TextField: UITextField, KeymanResponder { length: offset(from: textRange.start, to: textRange.end)) Manager.shared.setContextState(text: text, range: newRange) - Manager.shared.resetContext() + // This is called when editing in-app; do not reset context here. shouldUpdateKMText = false } } diff --git a/ios/engine/KMEI/KeymanEngine/Classes/TextView.swift b/ios/engine/KMEI/KeymanEngine/Classes/TextView.swift index 7233a1781b..87fe2fde28 100644 --- a/ios/engine/KMEI/KeymanEngine/Classes/TextView.swift +++ b/ios/engine/KMEI/KeymanEngine/Classes/TextView.swift @@ -274,7 +274,7 @@ extension TextView: UITextViewDelegate { if shouldUpdateKMText { // Catches copy/paste operations Manager.shared.setContextState(text: textView.text, range: textView.selectedRange) - Manager.shared.resetContext() + // This is called when editing in-app; do not reset context here. shouldUpdateKMText = false } }