Private
Public Access
Flip reaction emoji picker upward when it won't fit below
Reacting to a message near the bottom of the scrolled list opened a picker that ran off-screen and couldn't be used -- placement was hardcoded to "below" regardless of the trigger's actual position. Now computed per-click from the trigger's bounding rect against available viewport space, matching the composer's own picker (which was already positioned dynamically, just always "above" since it's pinned to the bottom of the screen). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1adb4fcbe0
commit
c84c92446c
2 files changed
+22
-3
No files matched your search
@@ -11,6 +11,11 @@ interface EmojiPickerProps {
|
||||
align?: 'left' | 'right'
|
||||
}
|
||||
|
||||
// Kept in sync with .emoji-picker's max-height in EmojiPicker.css -- callers
|
||||
// that compute placement dynamically (flipping above/below based on
|
||||
// available viewport space) need this to know how much room to check for.
|
||||
export const EMOJI_PICKER_MAX_HEIGHT = 380
|
||||
|
||||
function searchEmoji(query: string): string[] {
|
||||
const q = query.trim().toLowerCase()
|
||||
if (!q) return []
|
||||
|
||||
Reference in new issue
Block a user