!42167 手柄在富文本上忽略自身的滚动标记

Merge pull request !42167 from LuckClover/RichEditorIgnoreSelf
This commit is contained in:
openharmony_ci 2024-09-02 06:21:51 +00:00 committed by Gitee
commit b9a485b3d5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -459,7 +459,22 @@ void RichEditorSelectOverlay::OnAncestorNodeChanged(FrameNodeChangeInfoFlag flag
if (IsAncestorNodeGeometryChange(flag)) {
UpdateAllHandlesOffset();
}
BaseTextSelectOverlay::OnAncestorNodeChanged(flag);
auto pattern = GetPattern<RichEditorPattern>();
CHECK_NULL_VOID(pattern);
auto host = pattern->GetHost();
CHECK_NULL_VOID(host);
FrameNodeChangeInfoFlag changeFlag = flag;
if (IsAncestorNodeStartScroll(host->GetChangeInfoFlag()) || IsAncestorNodeEndScroll(host->GetChangeInfoFlag())) {
auto parent = host->GetAncestorNodeOfFrame(true);
changeFlag = FRAME_NODE_CHANGE_INFO_NONE;
while (parent) {
if (parent->GetChangeInfoFlag() != FRAME_NODE_CHANGE_INFO_NONE) {
changeFlag = changeFlag | parent->GetChangeInfoFlag();
}
parent = parent->GetAncestorNodeOfFrame(true);
}
}
BaseTextSelectOverlay::OnAncestorNodeChanged(changeFlag);
}
void RichEditorSelectOverlay::OnHandleMoveStart(bool isFirst)