update frameworks/core/components_ng/pattern/rich_editor/rich_editor_pattern.cpp.

Signed-off-by: zzc0127 <zhangzecong@huawei.com>
This commit is contained in:
zzc0127 2024-11-19 07:12:37 +00:00 committed by Gitee
parent 75fd1e142c
commit a267a6b33b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -6939,7 +6939,7 @@ void RichEditorPattern::MouseRightFocus(const MouseInfo& info)
auto isNeedSelected = false;
if (selectEnd == selectStart + 1) {
auto selectInfo = GetSpansInfo(selectStart, selectEnd, GetSpansMethod::ONSELECT);
auto results = selectInfo.GetSelection().resultObjects;
auto& results = selectInfo.GetSelection().resultObjects;
// select image or builder
isNeedSelected = results.size() == 1 && results.front().type == SelectSpanType::TYPEIMAGE;
}