mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 09:12:41 +00:00
大桌面场景下处理键盘关闭使用requestHideInput而非Close
Signed-off-by: zhoukechen <zhoukechen2@huawei.com> Change-Id: Ib3fe7103f996225f94fae67a3fa7cca9c5e2446c
This commit is contained in:
parent
af8442b744
commit
8c002c3334
@ -166,11 +166,12 @@ void WindowSceneHelper::IsCloseKeyboard(const RefPtr<FrameNode>& frameNode)
|
||||
bool isNeedKeyBoard = curPattern->NeedSoftKeyboard();
|
||||
auto saveKeyboard = IsFocusWindowSceneCloseKeyboard(frameNode);
|
||||
TAG_LOGI(AceLogTag::ACE_KEYBOARD,
|
||||
"FrameNode(%{public}s/%{public}d) notNeedSoftKeyboard, Keep:%{public}d, Need:%{public}d)",
|
||||
"FrameNode(%{public}s/%{public}d) notNeed SoftKeyboard, Keep:%{public}d, Need:%{public}d)",
|
||||
frameNode->GetTag().c_str(), frameNode->GetId(), !saveKeyboard, !isNeedKeyBoard);
|
||||
if (!saveKeyboard && !isNeedKeyBoard) {
|
||||
auto inputMethod = MiscServices::InputMethodController::GetInstance();
|
||||
if (inputMethod) {
|
||||
inputMethod->RequestHideInput();
|
||||
inputMethod->Close();
|
||||
TAG_LOGI(AceLogTag::ACE_KEYBOARD, "SoftKeyboard Closes Successfully.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user