mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-02-17 03:11:24 +00:00
!49147 [richEditor]修复手柄移动时变更选区导致振动问题
Merge pull request !49147 from zzc0127/handle
This commit is contained in:
commit
ee6e44bdc3
@ -183,7 +183,6 @@ void RichEditorSelectOverlay::UpdateSelectorOnHandleMove(const OffsetF& handleOf
|
||||
auto& textSelector = pattern->textSelector_;
|
||||
auto currentHandleIndex = pattern->GetHandleIndex(Offset(handleOffset.GetX(), handleOffset.GetY()));
|
||||
auto preHandleIndex = isFirst ? textSelector.baseOffset : textSelector.destinationOffset;
|
||||
pattern->StartVibratorByIndexChange(currentHandleIndex, preHandleIndex);
|
||||
pattern->SetCaretPosition(currentHandleIndex);
|
||||
if (isFirst) {
|
||||
pattern->HandleSelectionChange(currentHandleIndex, initSelector_.second);
|
||||
@ -196,6 +195,8 @@ void RichEditorSelectOverlay::UpdateSelectorOnHandleMove(const OffsetF& handleOf
|
||||
pattern->HandleSelectionChange(initSelector_.first, currentHandleIndex);
|
||||
}
|
||||
}
|
||||
auto finalHandleIndex = isFirst ? textSelector.baseOffset : textSelector.destinationOffset;
|
||||
pattern->StartVibratorByIndexChange(finalHandleIndex, preHandleIndex);
|
||||
}
|
||||
|
||||
void RichEditorSelectOverlay::OnHandleMoveDone(const RectF& handleRect, bool isFirstHandle)
|
||||
|
Loading…
x
Reference in New Issue
Block a user