mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2025-01-09 18:31:57 +00:00
!34410 notify onselectionchange when touch
Merge pull request !34410 from 末日拿铁/master
This commit is contained in:
commit
d55ad218e1
@ -452,8 +452,8 @@ void TextFieldPattern::BeforeCreateLayoutWrapper()
|
||||
break;
|
||||
}
|
||||
case InputOperation::SET_PREVIEW_TEXT:
|
||||
SetPreviewTextOperation(previewTextOperation.front());
|
||||
previewTextOperation.pop();
|
||||
SetPreviewTextOperation(previewTextOperation_.front());
|
||||
previewTextOperation_.pop();
|
||||
break;
|
||||
case InputOperation::SET_PREVIEW_FINISH:
|
||||
FinishTextPreviewOperation();
|
||||
@ -1664,6 +1664,7 @@ void TextFieldPattern::UpdateCaretByTouchMove(const TouchEventInfo& info)
|
||||
} else {
|
||||
selectController_->UpdateCaretInfoByOffset(touchOffset);
|
||||
}
|
||||
UpdateCaretInfoToController();
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_VOID(host);
|
||||
host->MarkDirtyNode(PROPERTY_UPDATE_RENDER);
|
||||
@ -7113,7 +7114,7 @@ int32_t TextFieldPattern::SetPreviewText(const std::string &previewValue, const
|
||||
auto host = GetHost();
|
||||
CHECK_NULL_RETURN(host, PREVIEW_NULL_POINTER);
|
||||
inputOperations_.emplace(InputOperation::SET_PREVIEW_TEXT);
|
||||
previewTextOperation.emplace(info);
|
||||
previewTextOperation_.emplace(info);
|
||||
CloseSelectOverlay(true);
|
||||
ScrollToSafeArea();
|
||||
host->MarkDirtyNode(PROPERTY_UPDATE_MEASURE_SELF_AND_PARENT);
|
||||
|
@ -1666,7 +1666,7 @@ private:
|
||||
Dimension previewUnderlineWidth_ = 2.0_vp;
|
||||
bool hasSupportedPreviewText_ = true;
|
||||
bool hasPreviewText_ = false;
|
||||
std::queue<PreviewTextInfo> previewTextOperation;
|
||||
std::queue<PreviewTextInfo> previewTextOperation_;
|
||||
int32_t previewTextStart_ = -1;
|
||||
int32_t previewTextEnd_ = -1;
|
||||
bool showKeyBoardOnFocus_ = true;
|
||||
|
Loading…
Reference in New Issue
Block a user