diff --git a/frameworks/core/components_ng/pattern/text/text_pattern.cpp b/frameworks/core/components_ng/pattern/text/text_pattern.cpp index 81f1b8d487e22eea42240c17f2a5d180f303acfb..1409290a6fc0059313c85a517bdb2d961376b62f 100644 --- a/frameworks/core/components_ng/pattern/text/text_pattern.cpp +++ b/frameworks/core/components_ng/pattern/text/text_pattern.cpp @@ -360,7 +360,7 @@ void TextPattern::ShowSelectOverlay(const RectF& firstHandle, const RectF& secon void TextPattern::HandleOnSelectAll() { auto textSize = GetWideText().length(); - textSelector_.Update(0, textSize); + textSelector_.Update(0, textSize - 1); CalculateHandleOffsetAndShowOverlay(); if (selectOverlayProxy_ && !selectOverlayProxy_->IsClosed()) { SelectHandleInfo firstHandleInfo;