mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 09:12:41 +00:00
!42143 修复动态切换后手柄位置错误的问题
Merge pull request !42143 from LuckClover/DynamicHandleError
This commit is contained in:
commit
520bd448d5
@ -2760,6 +2760,7 @@ void TextPattern::ProcessOverlayAfterLayout()
|
||||
showSelected_ = false;
|
||||
CalculateHandleOffsetAndShowOverlay();
|
||||
selectOverlay_->UpdateAllHandlesOffset();
|
||||
selectOverlay_->UpdateViewPort();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -485,10 +485,9 @@ bool TextFieldPattern::OnDirtyLayoutWrapperSwap(const RefPtr<LayoutWrapper>& dir
|
||||
} while (false);
|
||||
}
|
||||
auto textRect = textFieldLayoutAlgorithm->GetTextRect();
|
||||
if (!needToRefreshSelectOverlay_ ||
|
||||
(NearEqual(paragraphWidth, paragraphWidth_) && NearEqual(textRect.GetSize(), textRect_.GetSize()))) {
|
||||
needToRefreshSelectOverlay_ = false;
|
||||
}
|
||||
auto isSameSizeMouseMenu = NearEqual(paragraphWidth, paragraphWidth_) &&
|
||||
NearEqual(textRect.GetSize(), textRect_.GetSize()) && IsUsingMouse();
|
||||
needToRefreshSelectOverlay_ = needToRefreshSelectOverlay_ && !isSameSizeMouseMenu;
|
||||
paragraphWidth_ = paragraphWidth;
|
||||
HandleContentSizeChange(textRect);
|
||||
textRect_ = textRect;
|
||||
|
Loading…
Reference in New Issue
Block a user