diff --git a/frameworks/native/inputmethod_ability/src/input_method_ability.cpp b/frameworks/native/inputmethod_ability/src/input_method_ability.cpp index e8b2bc68..c9075afd 100644 --- a/frameworks/native/inputmethod_ability/src/input_method_ability.cpp +++ b/frameworks/native/inputmethod_ability/src/input_method_ability.cpp @@ -249,7 +249,7 @@ int32_t InputMethodAbility::StartInput(const InputClientInfo &clientInfo, bool i return ret; } isPendingShowKeyboard_ = clientInfo.isShowKeyboard; - auto task = []() { ShowKeyboard(); }; + auto task = [this]() { ShowKeyboard(); }; if (imeListener_ == nullptr || !imeListener_->PostTaskToEventHandler(task, "ShowKeyboard")) { IMSA_HILOGE("imeListener_ is nullptr, or post task failed!"); ShowKeyboard();