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

Signed-off-by: vincent <wangtao487@huawei.com>
Change-Id: I2adf520ea89e27290f0759bf7998b8911336d87a
This commit is contained in:
vincent 2024-09-02 10:42:39 +08:00
parent cd2c55a249
commit 1380eab4e6

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)