From c75d05ec0ceff670ee6631145e3f573d6bab3ad9 Mon Sep 17 00:00:00 2001 From: yly Date: Tue, 23 Jun 2026 10:10:52 +0800 Subject: [PATCH] =?UTF-8?q?EditBoxDialog=E7=82=B9=E5=87=BB=E9=94=AE?= =?UTF-8?q?=E7=9B=98=E4=B8=8B=E9=94=AE=E5=90=8C=E6=97=B6=E5=85=B3=E9=97=AD?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../entry/src/main/ets/components/EditBoxDialog.ets | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets b/templates/harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets index a8b8eb8ef7..921a7e67aa 100644 --- a/templates/harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets +++ b/templates/harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets @@ -57,6 +57,9 @@ export struct EditBoxDialog { .showUnderline(this.showInfo.showUnderline) .enterKeyType(this.showInfo.enterKeyType) .layoutWeight(1) + .onBlur(() => { + this.controller?.close(); + }) .onChange((value) => { this.showInfo.defaultMessage = value; this.workPort?.postMessage('onTextInput', value);