Skip to content

UI Balloons are hidden behind native <dialog> due to Top Layer stacking context #19894

@nweevers

Description

@nweevers

📝 Provide a description of the improvement

Current behavior
Currently, CKEditor 5 renders balloons and floating UI components (such as the link balloon, emoji picker, and autocomplete panels) within a container in the standard DOM (usually appended to body). These elements rely on z-index for stacking.

When the editor is placed inside a native HTML element, these balloons are rendered behind the dialog. This happens because the element is promoted to the browser's top layer, which sits above the entire document's stacking context. Traditional z-index values cannot move an element from the document body into or above the top layer.

Proposed change
We would like CKEditor 5 to utilize the native HTML Popover API for its floating UI components.

By applying the popover attribute to balloons, they would also be promoted to the top layer. This would natively resolve stacking conflicts with other top-layer elements like or other popovers, without requiring complex manual z-index or DOM-nesting workarounds.

📃 Other details

  • Browser: All modern browsers supporting the Popover API and (Chrome 114+, Edge 114+, Firefox 125+, Safari 17+).
  • OS: All
  • CKEditor version: v42.0.0+ (CKEditor 5)
  • Installed CKEditor plugins: Link, Emoji, Mention, and any other plugin utilizing the BalloonPanelView.

It was already an issue before: #14747


If you'd like to see this improvement implemented, add a 👍 reaction to this post.

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:integration-dxThis issue reports a problem with the developer experience when integrating CKEditor into a system.package:uitype:improvementThis issue reports a possible enhancement of an existing feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions