fix(composer): reset the docked emoji board when crossing the breakpoint so it cannot silently re-open
This commit is contained in:
parent
986ba05fa5
commit
5d023147c5
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue