tangled
alpha
login
or
join now
moth11.net
/
xcvr
2
fork
atom
frontend for xcvr appview
2
fork
atom
overview
issues
pulls
pipelines
blepp belalelpoppopo
moth11.net
6 months ago
710b2115
cca361d8
+2
-12
1 changed file
expand all
collapse all
unified
split
src
lib
components
AutoGrowTextArea.svelte
+2
-12
src/lib/components/AutoGrowTextArea.svelte
···
28
28
let curemojiresults: [EmojiSearchResults, number, number] | null =
29
29
$state(null);
30
30
let curemojinumber: null | number = $state(null);
31
31
-
let curemoji: null | string = $derived(
32
32
-
curemojiresults && curemojinumber
33
33
-
? curemojiresults[0][curemojinumber]
34
34
-
: null,
35
35
-
);
36
31
37
32
let inputEl: HTMLTextAreaElement;
38
33
let emojilist: HTMLElement | undefined = $state();
···
131
126
return [emoji, query[1], query[2]];
132
127
}
133
128
function emojifier(e: KeyboardEvent) {
134
134
-
if (
135
135
-
curemojiresults === null ||
136
136
-
curemojinumber === null ||
137
137
-
curemoji === null
138
138
-
) {
129
129
+
if (curemojiresults === null || curemojinumber === null) {
139
130
console.log("i returned");
140
131
return;
141
132
}
···
145
136
e.stopPropagation();
146
137
inputEl.value =
147
138
inputEl.value.slice(0, curemojiresults[1]) +
148
148
-
curemoji +
139
139
+
curemojiresults[0][curemojinumber].item.emoji +
149
140
inputEl.value.slice(curemojiresults[2]);
150
141
onInputEl?.(inputEl);
151
151
-
curemoji = null;
152
142
curemojiresults = null;
153
143
curemojinumber = null;
154
144
return;