From 76357478130ab0b351703c9d0fb3d1647cbe9cbd Mon Sep 17 00:00:00 2001 From: yly Date: Tue, 23 Jun 2026 10:54:31 +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 +++ .../entry/src/main/ets/components/EditBoxDialog.ets | 3 +++ 2 files changed, 6 insertions(+) diff --git a/templates/js-template-default/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets b/templates/js-template-default/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets index 9bb85561ad..90a8c84838 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets +++ b/templates/js-template-default/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets @@ -39,6 +39,9 @@ export struct EditBoxDialog { .defaultFocus(true) .backgroundColor('#ffffff') .layoutWeight(1) + .onBlur(() => { + this.controller?.close(); + }) .onChange((value) => { if (this.onTextChange) { this.onTextChange(value); diff --git a/templates/js-template-link/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets b/templates/js-template-link/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets index 9bb85561ad..90a8c84838 100644 --- a/templates/js-template-link/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets +++ b/templates/js-template-link/frameworks/runtime-src/proj.harmonyos-next/entry/src/main/ets/components/EditBoxDialog.ets @@ -39,6 +39,9 @@ export struct EditBoxDialog { .defaultFocus(true) .backgroundColor('#ffffff') .layoutWeight(1) + .onBlur(() => { + this.controller?.close(); + }) .onChange((value) => { if (this.onTextChange) { this.onTextChange(value);