Skip to content

Inline Toolbar overrides selected content outside editor when pressing "/" #2863

@litvin0d

Description

@litvin0d

Bug Description

When the Inline Toolbar is enabled in Editor.js, pressing the "/" key after selecting any text or element outside the editor area results in replacing the selected content with a "/". This issue occurs both in custom implementations and on the official Editor.js documentation site.

Steps to Reproduce

  1. Go to any page with the editor loaded (e.g., editorjs.io and click "Play With Demo").
  2. Select text or any element outside the editor's area.
  3. Press the "/" key on your keyboard.

Expected behavior

Pressing "/" should not affect selected content or elements outside the editor area.

Actual Behavior

The "/" keypress unexpectedly replaces selected text and elements outside the editor with "/".

Screenshots

image
image

Additional Context

This behavior appears to be triggered by Inline Toolbar, which activates the editor's command palette when "/" is pressed, regardless of the selected area. It disrupts the content and layout outside the editor area.

Environment

Editor.js version: 2.29.x

Browser: e.g., Chrome 130.0, Firefox 132.0

OS: e.g., Ubuntu 24.04, macOS 15

Plugins you use with their versions: Header 2.8.1, ImageTool 2.9.0, NestedList 1.4.2, Embed 2.8.1, Table 2.3.0, Underline 1.1.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions