Skip to content

fix(registry): set floating toolbar placement to bottom on mobile to prevent overlap (#4619) - #5083

Open
Samarth1306w wants to merge 1 commit into
udecode:mainfrom
Samarth1306w:fix/floating-toolbar-mobile-overlap-4619
Open

fix(registry): set floating toolbar placement to bottom on mobile to prevent overlap (#4619)#5083
Samarth1306w wants to merge 1 commit into
udecode:mainfrom
Samarth1306w:fix/floating-toolbar-mobile-overlap-4619

Conversation

@Samarth1306w

@Samarth1306w Samarth1306w commented Aug 5, 2026

Copy link
Copy Markdown
  • Auto release

🎯 Summary

Fixes #4619 — 'floating toolbar' overlaps with native default 'context menu' in Mobile.

🔍 Root Cause Analysis

On mobile viewports (iOS Safari / Android Chrome), native selection context menus (Copy / Cut / Share) pop up directly above the text selection. Because FloatingToolbar in apps/www/src/registry/ui/floating-toolbar.tsx defaulted to placement: 'top', custom floating toolbars collided and overlapped directly on top of native mobile context menus.

🛠️ Surgical Patch Breakdown

  1. apps/www/src/registry/ui/floating-toolbar.tsx:
    • Imported useIsMobile hook to set placement: isMobile ? 'bottom' : 'top'.
    • Updated fallbackPlacements on mobile to prioritize bottom placements (['bottom-start', 'bottom-end', 'top-start', 'top-end']).
  2. .changeset/fix-floating-toolbar-mobile-placement-overlap.md: Added patch changeset for www registry UI.

🧪 Verification & Test Coverage

  • Mobile Viewport Placement: Verified floating toolbar renders below text selection on mobile screens (<=768px), preventing collision with native mobile selection menus.
  • Changeset Included: Patch changeset generated for www registry UI.
  • Clean Merge: Branch rebased cleanly against main with 0 conflicts.

…prevent overlap (udecode#4619)

On mobile screens (iOS Safari / Android Chrome), native selection context menus pop up
above text selection. FloatingToolbar defaulting to placement: 'top' caused direct overlap.

Fix:
- Use useIsMobile hook in FloatingToolbar (floating-toolbar.tsx) to set placement: 'bottom' on mobile viewports.
- Update fallbackPlacements to prioritize bottom placements on mobile.
- Add patch changeset for www registry UI.

Closes udecode#4619
@codesandbox

codesandbox Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@changeset-bot

changeset-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d65c65b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dosubot dosubot Bot added size:S This PR changes 10-29 lines, ignoring generated files. mobile patch Bugfix & documentation PR plugin:toolbar labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mobile patch Bugfix & documentation PR plugin:toolbar size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'floating toolbar' overlaps with native default 'context menu' in Mobile

2 participants