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.
1 week 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
190
};
191
191
const handlePointerDown = (e: PointerEvent) => {
192
192
if (containerRef.current && !containerRef.current.contains(e.target)) {
193
193
+
// ignore the trigger button itself as it'll close the picker anyways
194
194
+
if (
195
195
+
e.target instanceof HTMLElement &&
196
196
+
e.target.closest("#web-emoji-picker-btn")
197
197
+
) {
198
198
+
return;
199
199
+
}
193
200
onClose();
194
201
}
195
202
};
+1
-5
js/components/src/components/chat/chat-box.tsx
···
587
587
>
588
588
<Button
589
589
variant="secondary"
590
590
+
id="web-emoji-picker-btn"
590
591
aria-label="Insert Emoji"
591
592
style={{ borderRadius: 16, maxWidth: 44, aspectRatio: 1 }}
592
593
onPress={() => {
593
593
-
console.log("[ChatBox] emoji button pressed", {
594
594
-
onEmojiPickerToggle: !!onEmojiPickerToggle,
595
595
-
emojiPicker: !!emojiPicker,
596
596
-
showEmojiSelector,
597
597
-
});
598
594
onEmojiPickerToggle
599
595
? onEmojiPickerToggle()
600
596
: setShowEmojiSelector(!showEmojiSelector);