diff --git a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp index bb22927e969..1bb1b62dd28 100644 --- a/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp +++ b/frameworks/core/components_ng/pattern/text_field/text_field_pattern.cpp @@ -7171,6 +7171,9 @@ void TextFieldPattern::HandleCursorOnDragMoved(const RefPtr& no auto host = GetHost(); CHECK_NULL_VOID(host); if (HasFocus()) { + if (!isCursorAlwaysDisplayed_) { + isCursorAlwaysDisplayed_ = true; + } if (SystemProperties::GetDebugEnabled()) { TAG_LOGD(AceLogTag::ACE_TEXT_FIELD, "In OnDragMoved, the cursor has always Displayed in the textField, id:%{public}d", host->GetId());