mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-02-15 11:36:54 +00:00
Fix by-word/paragraph text selection in WebPage.
This commit is contained in:
parent
12f5ccaaa5
commit
8535a579ca
@ -678,12 +678,12 @@ TextSelection WebPage::adjustSelection(TextSelection selection, TextSelectType t
|
||||
return _siteName.adjustSelection(selection, type);
|
||||
}
|
||||
|
||||
auto titlesLength = _siteName.length() + _title.length();
|
||||
auto titleSelection = _title.adjustSelection(toTitleSelection(selection), type);
|
||||
if ((!_siteNameLines && !_descriptionLines) || (selection.from >= _siteName.length() && selection.to <= _description.length())) {
|
||||
if ((!_siteNameLines && !_descriptionLines) || (selection.from >= _siteName.length() && selection.to <= titlesLength)) {
|
||||
return fromTitleSelection(titleSelection);
|
||||
}
|
||||
|
||||
auto titlesLength = _siteName.length() + _title.length();
|
||||
auto descriptionSelection = _description.adjustSelection(toDescriptionSelection(selection), type);
|
||||
if ((!_siteNameLines && !_titleLines) || selection.from >= titlesLength) {
|
||||
return fromDescriptionSelection(descriptionSelection);
|
||||
|
Loading…
Reference in New Issue
Block a user