[bugfix]:[修复autofill删除popupMap导致popup无法点击关闭问题]

Signed-off-by: miaoyu <miaoyu6@huawei.com>
Change-Id: I75bd693b2fe4b7f68ccc2a44ee54dbefef8a7055
This commit is contained in:
miaoyu 2024-07-05 02:26:56 +00:00
parent 94860cc611
commit 0dbc6ca51f
2 changed files with 0 additions and 24 deletions

View File

@ -2907,24 +2907,6 @@ void UIContentImpl::RecoverForm(const std::string& statusData)
return pipeline->OnFormRecover(statusData);
}
void UIContentImpl::RemoveOldPopInfoIfExsited(bool isShowInSubWindow, int32_t nodeId)
{
auto pipeline = NG::PipelineContext::GetCurrentContext();
CHECK_NULL_VOID(pipeline);
auto overlayManager = pipeline->GetOverlayManager();
if (isShowInSubWindow) {
auto subwindow = SubwindowManager::GetInstance()->GetSubwindow(Container::CurrentId());
CHECK_NULL_VOID(subwindow);
overlayManager = subwindow->GetOverlayManager();
}
CHECK_NULL_VOID(overlayManager);
if (overlayManager->HasPopupInfo(nodeId)) {
LOGD("Target node id=%{public}d has old popup info, erase it", nodeId);
overlayManager->ErasePopupInfo(nodeId);
}
}
RefPtr<PopupParam> UIContentImpl::CreateCustomPopupParam(bool isShow, const CustomPopupUIExtensionConfig& config)
{
auto popupParam = AceType::MakeRefPtr<PopupParam>();
@ -3005,10 +2987,6 @@ void UIContentImpl::OnPopupStateChange(
LOGD("Created custom popup is invisible");
ContainerScope scope(instanceId_);
auto taskExecutor = Container::CurrentTaskExecutor();
CHECK_NULL_VOID(taskExecutor);
taskExecutor->PostDelayedTask([config, nodeId]() { RemoveOldPopInfoIfExsited(config.isShowInSubWindow, nodeId); },
TaskExecutor::TaskType::UI, 100, "ArkUIRemoveOldPopupInfo"); // delay 100ms
customPopupConfigMap_.erase(nodeId);
popupUIExtensionRecords_.erase(nodeId);
}
@ -3094,7 +3072,6 @@ void UIContentImpl::DestroyCustomPopupUIExtension(int32_t nodeId)
CHECK_NULL_VOID(targetNode);
auto popupParam = CreateCustomPopupParam(false, config);
NG::ViewAbstract::BindPopup(popupParam, targetNode, nullptr);
RemoveOldPopInfoIfExsited(config.isShowInSubWindow, nodeId);
customPopupConfigMap_.erase(nodeId);
popupUIExtensionRecords_.erase(nodeId);
},

View File

@ -344,7 +344,6 @@ private:
void OnPopupStateChange(const std::string& event, const CustomPopupUIExtensionConfig& config, int32_t nodeId);
void SetCustomPopupConfig(int32_t nodeId, const CustomPopupUIExtensionConfig& config, int32_t popupId);
static void RemoveOldPopInfoIfExsited(bool isShowInSubWindow, int32_t nodeId);
void RenderLayoutBoundary(bool isDebugBoundary);
static void EnableSystemParameterTraceLayoutCallback(const char* key, const char* value, void* context);
static void EnableSystemParameterTraceInputEventCallback(const char* key, const char* value, void* context);