mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
The mobile branch of FloatingToolbar rendered nothing until `position.visible` was true, but `usePosition` only reports a visible position once the menu element has been measured through `menuRef`. On desktop the wrapper is always mounted (it animates in via opacity) so the ref is populated on first render, while on mobile the toolbar is the only thing that mounts the ref — leaving it permanently null and the bar never displayed. Gate the mobile bar on there being toolbar content instead. Position is irrelevant on mobile: the bar is fixed to the bottom of the viewport and its vertical offset is owned by useKeyboardStickyOffset. Also size the bar with border-box and center its content vertically, so the declared 60px is the height of the bar rather than 60px of content plus padding with the buttons pinned to the top. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GhGyxA663bMFZ1NxBhLAoF