mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2025-08-31 22:50:43 +00:00
View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1197 Closes #1165 Approved-by: Hazelnoot <acomputerdog@gmail.com> Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
commit
04d45859e6
1 changed files with 6 additions and 4 deletions
|
@ -218,13 +218,15 @@ parseAndMergeCategories('', customEmojiFolderRoot);
|
|||
watch(q, () => {
|
||||
if (emojisEl.value) emojisEl.value.scrollTop = 0;
|
||||
|
||||
if (q.value === '') {
|
||||
const query = q.value.trim();
|
||||
|
||||
if (query === '') {
|
||||
searchResultCustom.value = [];
|
||||
searchResultUnicode.value = [];
|
||||
return;
|
||||
}
|
||||
|
||||
const newQ = q.value.replace(/:/g, '').normalize('NFC').toLowerCase();
|
||||
const newQ = query.replace(/:/g, '').normalize('NFC').toLowerCase();
|
||||
|
||||
const searchCustom = () => {
|
||||
const max = 100;
|
||||
|
@ -442,7 +444,7 @@ function input(): void {
|
|||
// Using custom input event instead of v-model to respond immediately on
|
||||
// Android, where composition happens on all languages
|
||||
// (v-model does not update during composition)
|
||||
q.value = searchEl.value?.value.trim() ?? '';
|
||||
q.value = searchEl.value?.value ?? '';
|
||||
}
|
||||
|
||||
function paste(event: ClipboardEvent): void {
|
||||
|
@ -467,7 +469,7 @@ function onKeydown(ev: KeyboardEvent) {
|
|||
}
|
||||
|
||||
function done(query?: string): boolean | void {
|
||||
if (query == null) query = q.value;
|
||||
if (query == null) query = q.value.trim();
|
||||
if (query == null || typeof query !== 'string') return;
|
||||
|
||||
const q2 = query.replace(/:/g, '');
|
||||
|
|
Loading…
Add table
Reference in a new issue