Skip to content

Tooltip input closes immediately on click and tooltip text is not applied #142

@zoherr

Description

@zoherr

Description

When clicking the tooltip inline tool, the tooltip input either closes immediately or does not work as expected.
Even when the input stays open, typing tooltip text and pressing Enter does not apply the tooltip.

This makes the tooltip tool unusable in normal editing flow.


Steps to Reproduce

  1. Initialize Editor.js with editorjs-tooltip
  2. Type some text in a paragraph
  3. Select a word
  4. Click the tooltip icon in the inline toolbar

Current Behavior

  • Tooltip input closes immediately after clicking the tooltip icon
    OR
  • Tooltip input opens but:
    • typing text does nothing
    • pressing Enter does not apply the tooltip
  • Tooltip is not created or applied to the selected text

1226.mp4

Expected Behavior

  • Clicking the tooltip icon should keep the tooltip input open
  • Tooltip input should stay focused
  • Typing tooltip text and pressing Enter should apply the tooltip to the selected text
  • Tooltip tool should not close unexpectedly

Environment

  • Editor.js version: 2.x
  • editorjs-tooltip version: 1.2.2
  • Browser: Chrome (latest)
  • Framework: React (Vite)
1226.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions