tangled
alpha
login
or
join now
stream.place
/
streamplace
74
fork
atom
Live video on the AT Protocol
74
fork
atom
overview
issues
1
pulls
pipelines
ignore the picker button itself
Natalie B.
2 weeks ago
cb8178ac
0c9e4bfc
+8
-5
2 changed files
expand all
collapse all
unified
split
js
app
components
emoji-picker
emoji-picker.web.tsx
components
src
components
chat
chat-box.tsx
+7
js/app/components/emoji-picker/emoji-picker.web.tsx
···
190
};
191
const handlePointerDown = (e: PointerEvent) => {
192
if (containerRef.current && !containerRef.current.contains(e.target)) {
0
0
0
0
0
0
0
193
onClose();
194
}
195
};
···
190
};
191
const handlePointerDown = (e: PointerEvent) => {
192
if (containerRef.current && !containerRef.current.contains(e.target)) {
193
+
// ignore the trigger button itself as it'll close the picker anyways
194
+
if (
195
+
e.target instanceof HTMLElement &&
196
+
e.target.closest("#web-emoji-picker-btn")
197
+
) {
198
+
return;
199
+
}
200
onClose();
201
}
202
};
+1
-5
js/components/src/components/chat/chat-box.tsx
···
587
>
588
<Button
589
variant="secondary"
0
590
aria-label="Insert Emoji"
591
style={{ borderRadius: 16, maxWidth: 44, aspectRatio: 1 }}
592
onPress={() => {
593
-
console.log("[ChatBox] emoji button pressed", {
594
-
onEmojiPickerToggle: !!onEmojiPickerToggle,
595
-
emojiPicker: !!emojiPicker,
596
-
showEmojiSelector,
597
-
});
598
onEmojiPickerToggle
599
? onEmojiPickerToggle()
600
: setShowEmojiSelector(!showEmojiSelector);
···
587
>
588
<Button
589
variant="secondary"
590
+
id="web-emoji-picker-btn"
591
aria-label="Insert Emoji"
592
style={{ borderRadius: 16, maxWidth: 44, aspectRatio: 1 }}
593
onPress={() => {
0
0
0
0
0
594
onEmojiPickerToggle
595
? onEmojiPickerToggle()
596
: setShowEmojiSelector(!showEmojiSelector);