Skip to content

[bug]: editor popover overflows in drawer #515

Closed

Description

@l2dy

What happened

The rich text editor's formatting popover overflows when I select an issue on https://orbit.noveum.ai/my-issues.

Image

What you expected instead

The popover should be displayed in full.

Steps to reproduce

  1. Sign in
  2. Go to https://orbit.noveum.ai/my-issues
  3. Click on an existing issue
  4. Select first word in issue body
  5. Observe overflow in the drawer

Where did you see this

orbit.noveum.ai

Which part of Orbit

Issues, lists and boards

If this is a realtime problem

  • A "Reconnecting to live updates" banner appeared
  • More than one tab or browser was open
  • More than one user was in the workspace

Environment

- Orbit commit or version:
- Bun version (bun --version):
- OS:
- Browser:

Logs, errors or screenshots

Before you submit

  • I searched the existing issues and this is not a duplicate
  • I can reproduce this consistently, or I have said how often it happens

Activity

  1. added
    bug
    needs triage
    on Oct 2, 2026
  2. github-actions commented on Oct 2, 2026

    @github-actions

    Thanks for opening your first issue on Orbit.

    A maintainer will triage this. If it is a bug, the fastest way to move it
    along is exact steps to reproduce starting from the seeded demo workspace,
    since that is what we run locally.

    If you fancy fixing it yourself, CONTRIBUTING.md
    walks through the setup. You need Bun and Docker, and nothing else.

  3. dannyward630 commented on Oct 19, 2026

    @dannyward630

    I can take this issue. I plan to reproduce the overflow with the supplied steps, trace the formatting popover placement in the issue drawer, and add a focused regression test. Following the project workflow, I will wait for assignment before starting.

  4. ayam04 commented on Nov 16, 2026

    @ayam04
    Contributor

    Taking this one.

    Root cause is in SelectionBubble (apps/web/src/features/docs/editor/rich-text-editor.tsx): the popover is anchored at the selection midpoint and shifted with -translate-x-1/2, and top is a fixed 44px above the selection top. Neither axis is clamped to the editor's own box, and the surface scrolls inside an overflow-y-auto element (which computes overflow-x: auto too), so anything outside the box is clipped.

    That matches the repro exactly. Selecting the first word of a line puts the midpoint a few pixels from the left edge, so half the popover lands outside the narrow drawer. Selecting anything on the first line puts the popover above the box entirely.

    Plan: measure the popover after mount, clamp left into the editor's box, and flip top below the selection when there is no room above. The placement rule lands in an exported pure helper so the reported geometry (first word, 397px drawer) is a unit test, plus a component test that stubs the container rect and caret coords. No new dependency and no layout library.

  5. ayam04 commented on Nov 16, 2026

    @ayam04
    Contributor

    PR up: #581. It measures the popover after mount, clamps it into the editor box on both axes, and flips it below the selection when there is no room above. The placement rule is a pure exported helper, so the reported geometry is a unit test, and two component tests pin the rendered offsets with the container and popover rects stubbed to the 397px drawer. Both directions proven by restoring the old arithmetic and then only the old rendering.

    Heads up on one thing I left out on purpose: the slash and mention menus use the same unbounded container-relative positioning, and TableControls shares caretPosition, so they can clip at the same edges. Separate from the reported popover, so separate PR if you want it.

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

    bugneeds triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions