Skip to content

Mobile formatting toolbar: the block type (and color) dropdown opens below the toolbar, behind the on-screen keyboard #3378

Open

Description

@imagaram

What’s broken?

The block type dropdown of the mobile formatting toolbar opens below the toolbar, i.e. behind the keyboard, so no item can be chosen (seen on the iPhone).

Measured on desktop Chromium with touch emulation: with a visual viewport height of 335 px and the toolbar at y = 289, the dropdown was placed at y = 340 with its full height (456 px) and data-position="bottom".

What did you expect to happen?

The list opens above the toolbar, inside the visible area, and scrolls if it is too long.

Steps to reproduce

  1. Focus the editor on a phone so that the keyboard and the mobile formatting toolbar (pinned above the keyboard) are shown.
  2. Tap the block type select (the first button, e.g. "Paragraph").

BlockNote version

v0.57.0

Environment

Safari on iOS 27.2.1 (iPhone 12 Pro Max); also desktop Chromium with touch emulation. @blocknote/mantine 0.57.0, @mantine/core 9.8.0, React 19

Additional context

Where we saw it

  • iPhone 12 Pro Max, iOS 27.2.1, Safari — on the device we saw that the list is hidden behind the keyboard and cannot be used.
  • Desktop Chromium with touch emulation (shrinking the viewport height after the editor has loaded, so that the mobile toolbar is shown) — the numbers above were measured here.

Cause (as far as we can tell)

The Mantine Menu is used with middlewares={{ flip: true, shift: true, size: true }}. (ToolbarSelect passes the same middlewares on main as of 2026-11-20; #3306 changes where the mobile toolbar is portalled, not this.) With Mantine's default preventPositionChangeWhenVisible, flip is configured with fallbackStrategy: "initialPlacement". When the full list fits neither above nor below (it is taller than the space above the toolbar), the placement stays at the initial side (bottom), and size then computes a negative max-height, which is ignored.

Workaround we use

.bn-portal-anchor-holder:has(+ .bn-mobile-formatting-toolbar) .mantine-Menu-dropdown {
  max-height: calc(var(--bn-vv-height, 100dvh) - 72px);
  overflow-y: auto;
}

With the height capped, the list fits above the toolbar, flip picks top, and the list scrolls.

Suggestion

In the mobile UI mode, open toolbar dropdowns upwards (position="top-start"), or cap their height to the space above the toolbar.

Contribution

  • I'd be interested in contributing a fix for this issue

Sponsor

  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Activity

  1. added
    needs-triage
    on Nov 19, 2026
  2. judithroth commented on Nov 20, 2026

    @judithroth

    We also encountered that and Ihor found the root of the issue: opf/openproject#26648 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions