Signed-off-by: ma-shaoyin <mashaoyin1@huawei.com>

Changes to be committed:
This commit is contained in:
ma-shaoyin 2024-06-06 16:52:59 +08:00
parent 057f3b9538
commit d967f6dee1

View File

@ -826,8 +826,8 @@ int32_t InputMethodAbility::CreatePanel(const std::shared_ptr<AbilityRuntime::Co
auto flag = panels_.ComputeIfAbsent(
panelInfo.panelType, [panelHeightCallback, &panelInfo, &context, &inputMethodPanel](
const PanelType &panelType, std::shared_ptr<InputMethodPanel> &panel) {
inputMethodPanel->SetPanelHeightCallback(panelHeightCallback);
inputMethodPanel = std::make_shared<InputMethodPanel>();
inputMethodPanel->SetPanelHeightCallback(panelHeightCallback);
auto ret = inputMethodPanel->CreatePanel(context, panelInfo);
if (ret == ErrorCode::NO_ERROR) {
panel = inputMethodPanel;