fix(composer): reset the docked emoji board when crossing the breakpoint so it cannot silently re-open

This commit is contained in:
heaven 2026-06-04 12:27:10 +03:00
parent 986ba05fa5
commit 5d023147c5

View file

@ -222,6 +222,11 @@ export const RoomInput = forwardRef<HTMLDivElement, RoomInputProps>(
// top of the composer instead of floating as a pop-out.
const dockEmojiBoard = mobileOrTablet() || screenSize === ScreenSize.Mobile;
const [emojiBoardTab, setEmojiBoardTab] = useState<EmojiBoardTab | undefined>(undefined);
// Crossing the dock/pop-out breakpoint remounts the trigger; drop any open
// dock state so the board doesn't silently re-open after a resize round-trip.
useEffect(() => {
setEmojiBoardTab(undefined);
}, [dockEmojiBoard]);
const roomToParents = useAtomValue(roomToParentsAtom);
const powerLevels = usePowerLevelsContext();
const creators = useRoomCreators(room);