From c51b03ae9c251e93be18aef749cd7c8c016f7a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Thu, 22 Jul 2021 18:39:15 +0800 Subject: [PATCH] Android: add missing part for beforeTextChange --- .../doric/src/main/java/pub/doric/shader/InputNode.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 834325c2..e31014e3 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 @@ -450,9 +450,10 @@ public class InputNode extends ViewNode implements TextWatcher, View.O } AsyncResult asyncResult = callJSResponse(beforeTextChangeId, new JSONBuilder() - .put("start", "") - .put("length", "") - .put("text", "") + .put("editing", dest.toString()) + .put("start", dstart) + .put("length", dend - dstart) + .put("replacement", source.toString()) .toJSONObject()); JSDecoder jsDecoder = asyncResult.synchronous().get(); boolean ret = true;