From 5a9b55c75b95cc8952138df92449e80025e338d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Mon, 7 Jun 2021 17:14:55 +0800 Subject: [PATCH] filter the candidate while inputing --- doric-iOS/Pod/Classes/Shader/DoricInputNode.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doric-iOS/Pod/Classes/Shader/DoricInputNode.m b/doric-iOS/Pod/Classes/Shader/DoricInputNode.m index e78b7b9c..925a161a 100644 --- a/doric-iOS/Pod/Classes/Shader/DoricInputNode.m +++ b/doric-iOS/Pod/Classes/Shader/DoricInputNode.m @@ -227,6 +227,8 @@ - (BOOL)textViewShouldEndEditing:(UITextView *)textView { } - (void)textViewDidChange:(UITextView *)textView { + if (textView.markedTextRange) return; + if (self.maxLength) { UITextRange *selectedRange = [textView markedTextRange]; UITextPosition *pos = [textView positionFromPosition:selectedRange.start offset:0];