mirror of
https://github.com/openharmony/ace_ace_engine.git
synced 2026-07-21 18:05:24 -04:00
fix select popup component extra reference issue.
Signed-off-by: xuzhidan <xuzhidan1@huawei.com> Change-Id: I56c3efeaee586a55e9871aa7d33e201ecdfda1f6
This commit is contained in:
@@ -1745,7 +1745,7 @@ void JSViewAbstract::JsBindMenu(const JSCallbackInfo& info)
|
||||
return;
|
||||
}
|
||||
auto showDialog = refPtr->GetTargetCallback();
|
||||
showDialog("", info.GetGlobalLocation());
|
||||
showDialog("BindMenu", info.GetGlobalLocation());
|
||||
});
|
||||
click->SetOnClick(tapGesture);
|
||||
auto menuTheme = GetTheme<SelectTheme>();
|
||||
|
||||
@@ -90,6 +90,11 @@ void MenuElement::OnTargetCallback(const ComposeId& id, const Offset& point)
|
||||
}
|
||||
|
||||
auto popup = data_->GetPopup();
|
||||
if (id == "BindMenu") {
|
||||
popup->ShowDialog(stack, point, point, true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (id.empty()) {
|
||||
popup->ShowDialog(stack, point, point, true);
|
||||
context->SetContextMenu(popup);
|
||||
|
||||
Reference in New Issue
Block a user