From 7a94ef0a53645ad2fc6f6edf91f7a375ce8f7f63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Fri, 23 Jul 2021 10:35:57 +0800 Subject: [PATCH] fix android input on text change recursive --- .../doric/src/main/java/pub/doric/shader/InputNode.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doric-android/doric/src/main/java/pub/doric/shader/InputNode.java b/doric-android/doric/src/main/java/pub/doric/shader/InputNode.java index e31014e3..8aea2b32 100644 --- a/doric-android/doric/src/main/java/pub/doric/shader/InputNode.java +++ b/doric-android/doric/src/main/java/pub/doric/shader/InputNode.java @@ -165,7 +165,9 @@ public class InputNode extends ViewNode implements TextWatcher, View.O break; case "text": String text = prop.isString() ? prop.asString().toString() : ""; - view.setText(text); + if (!view.getText().toString().equals(text)) { + view.setText(text); + } view.setSelection(text.length()); break; case "textSize":