diff --git a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp index cde53ca1d6b..bb037e7d27c 100644 --- a/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp +++ b/frameworks/core/components_ng/manager/drag_drop/drag_drop_manager.cpp @@ -1718,7 +1718,7 @@ OffsetF DragDropManager::GetTouchOffsetRelativeToSubwindow(int32_t containerId, containerId >= MIN_SUBCONTAINER_ID ? SubwindowManager::GetInstance()->GetParentContainerId(containerId) : containerId); CHECK_NULL_RETURN(subwindow, OffsetF(x, y)); - auto subwindowOffset = subwindow->GetRect().GetOffset(); + auto subwindowOffset = subwindow->GetWindowRect().GetOffset(); touchOffset.SetX(touchOffset.GetX() - subwindowOffset.GetX()); touchOffset.SetY(touchOffset.GetY() - subwindowOffset.GetY()); return touchOffset;