From 475d38cdab04dd71ad3df3b7f77f667568020185 Mon Sep 17 00:00:00 2001 From: guojin31 Date: Mon, 27 May 2024 19:29:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E9=80=80=E5=91=8A=E8=AD=A6=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E4=B8=AD=E7=9A=84=E9=94=99=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: guojin31 --- .../napi/keyboardpanelmanager/js_keyboard_panel_manager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frameworks/js/napi/keyboardpanelmanager/js_keyboard_panel_manager.cpp b/frameworks/js/napi/keyboardpanelmanager/js_keyboard_panel_manager.cpp index c6cbedd1..e5126b3e 100644 --- a/frameworks/js/napi/keyboardpanelmanager/js_keyboard_panel_manager.cpp +++ b/frameworks/js/napi/keyboardpanelmanager/js_keyboard_panel_manager.cpp @@ -286,7 +286,9 @@ std::shared_ptr JsKeyboardPanelManager::GetEventHandle return handler_; } std::lock_guard lock(eventHandlerMutex_); - handler_ = AppExecFwk::EventHandler::Current(); + if (handler_ == nullptr) { + handler_ = AppExecFwk::EventHandler::Current(); + } return handler_; }