mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-03-02 06:58:14 +00:00
TextField拼音预上屏字符长按后,会激活放大镜
Signed-off-by: jiangzhijun8 <jiangzhijun7@huawei.com>
This commit is contained in:
parent
1dc504c431
commit
6f3d1304c8
@ -1767,9 +1767,6 @@ void TextFieldPattern::UpdateCaretByTouchMove(const TouchEventInfo& info)
|
||||
SetScrollEnabled(scrollable_);
|
||||
// limit move when preview text is shown
|
||||
auto touchOffset = info.GetTouches().front().GetLocalLocation();
|
||||
if (magnifierController_) {
|
||||
magnifierController_->SetLocalOffset({ touchOffset.GetX(), touchOffset.GetY() });
|
||||
}
|
||||
int32_t preCaretIndex = selectController_->GetCaretIndex();
|
||||
if (GetIsPreviewText()) {
|
||||
TAG_LOGI(ACE_TEXT_FIELD, "UpdateCaretByTouchMove when has previewText");
|
||||
@ -1793,6 +1790,9 @@ void TextFieldPattern::UpdateCaretByTouchMove(const TouchEventInfo& info)
|
||||
selectController_->UpdateCaretInfoByOffset(previewTextTouchOffset);
|
||||
} else {
|
||||
selectController_->UpdateCaretInfoByOffset(touchOffset);
|
||||
if (magnifierController_) {
|
||||
magnifierController_->SetLocalOffset({ touchOffset.GetX(), touchOffset.GetY() });
|
||||
}
|
||||
}
|
||||
|
||||
if (selectController_->GetCaretIndex() != preCaretIndex) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user