Make search and select work for truncated text

fixes #4367
This commit is contained in:
softsimon 2023-11-13 17:45:15 +09:00
parent 1aea3fcac5
commit d4568b631d
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
2 changed files with 7 additions and 0 deletions

View File

@ -11,9 +11,11 @@
</span> </span>
<ng-template #ltrTruncated> <ng-template #ltrTruncated>
<div class="hidden">{{ text }}</div>
<span class="first">{{text.slice(0,-lastChars)}}</span><span class="last-four">{{text.slice(-lastChars)}}</span> <span class="first">{{text.slice(0,-lastChars)}}</span><span class="last-four">{{text.slice(-lastChars)}}</span>
</ng-template> </ng-template>
<ng-template #rtlTruncated> <ng-template #rtlTruncated>
<div class="hidden">{{ text }}</div>
<span class="first">{{text.slice(lastChars)}}</span><span class="last-four">{{text.slice(0,lastChars)}}</span> <span class="first">{{text.slice(lastChars)}}</span><span class="last-four">{{text.slice(0,lastChars)}}</span>
</ng-template> </ng-template>

View File

@ -27,4 +27,9 @@
&.inline { &.inline {
display: inline-flex; display: inline-flex;
} }
}
.hidden {
color: transparent;
position: absolute;
} }