mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-23 06:40:06 +00:00
Signed-off-by: ma-shaoyin <mashaoyin1@huawei.com>
Changes to be committed:
This commit is contained in:
parent
0e287bf89a
commit
d4e19e11aa
@ -858,15 +858,14 @@ int32_t InputMethodAbility::ShowPanel(const std::shared_ptr<InputMethodPanel> &i
|
||||
int32_t InputMethodAbility::HidePanel(const std::shared_ptr<InputMethodPanel> &inputMethodPanel)
|
||||
{
|
||||
// Current Ime is exiting, hide softkeyboard will cause the TextFiled to lose focus.
|
||||
if (isImeTerminating.load() && inputMethodPanel != nullptr &&
|
||||
inputMethodPanel->GetPanelType() == PanelType::SOFT_KEYBOARD) {
|
||||
if (inputMethodPanel == nullptr) {
|
||||
return ErrorCode::ERROR_BAD_PARAMETERS;
|
||||
}
|
||||
if (isImeTerminating.load() && inputMethodPanel->GetPanelType() == PanelType::SOFT_KEYBOARD) {
|
||||
IMSA_HILOGI("Current Ime is terminating, no need to hide keyboard.");
|
||||
return ErrorCode::NO_ERROR;
|
||||
}
|
||||
std::lock_guard<std::recursive_mutex> lock(keyboardCmdLock_);
|
||||
if (inputMethodPanel == nullptr) {
|
||||
return ErrorCode::ERROR_BAD_PARAMETERS;
|
||||
}
|
||||
return HidePanel(inputMethodPanel, inputMethodPanel->GetPanelFlag(), Trigger::IME_APP, false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user