Skip to content

fix: keep editor drops inside the create space modal's focus trap - #3450

Merged
AlexAndBear merged 7 commits into
mainfrom
fix/create-space-editor-drops-focus-trap
Sep 25, 2026
Merged

AlexAndBear merged 7 commits into
mainfrom
fix/create-space-editor-drops-focus-trap

Conversation

@AlexAndBear

@AlexAndBear AlexAndBear commented Sep 24, 2026 •

Copy link
Copy Markdown
Member

Description

The text editor in the create space options teleports its drops (link panel, toolbar dropdowns, emoji picker) to the body. That puts them outside the modal's focus trap, and focus-trap pulls focus back into the modal as soon as one of their inputs is focused:

  • clicking "Link" freezes the page, because the link panel and the focus trap keep taking focus from each other
  • the emoji picker opens and emojis can be clicked, but its search field can't be focused

TextEditorProvider now takes a teleport prop (default: body) and is the only place that sets where the editor's drops go.

Related Issue

How Has This Been Tested?

  • test environment: local, pnpm test:unit, pnpm lint, pnpm check:types
  • test case 1: New space -> Options -> Description -> Link: the link panel opens and its inputs can be focused and typed into
  • test case 2: New space -> Options -> Description -> emoji picker: the search field can be focused and typed into
  • test case 3: the editor outside of modals still teleports its drops to the body
  • test case 4: the space description and announcement banner editors show neither frontmatter nor print
  • test case 5: mail compose: toolbar dropdowns and the link panel open and work as before

Types of changes

  • Bugfix
  • Enhancement (a change that doesn't break existing code or deployments)
  • Breaking change (a modification that affects current functionality)
  • Technical debt (addressing code that needs refactoring or improvements)
  • Tests (adding or improving tests)
  • Documentation (updates or additions to documentation)
  • Maintenance (like dependency updates or tooling adjustments)

@AlexAndBear AlexAndBear self-assigned this Sep 24, 2026

@v-scharf v-scharf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine 👍

@AlexAndBear
AlexAndBear merged commit 09eeb26 into main Sep 25, 2026
31 checks passed
@AlexAndBear
AlexAndBear deleted the fix/create-space-editor-drops-focus-trap branch September 25, 2026 06:47
@openclouders openclouders mentioned this pull request Sep 24, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create new space using option. page becomes frozen when click by link

2 participants