Skip to content

Conversation

@zoherr
Copy link

@zoherr zoherr commented Dec 26, 2025

Summary

This PR fixes multiple related issues where the tooltip inline tool becomes unusable:

  • Tooltip input closes immediately on click
  • Tooltip input loses focus
  • Pressing Enter breaks selection or creates empty tooltip
  • Tooltip text is not applied reliably

Root Cause

Editor.js captures the Enter key before the tooltip input receives focus.
This causes selection loss and toolbar closure.

Fix

  • Auto-focus tooltip input when opened
  • Prevent Enter key from bubbling to Editor.js while tooltip input is open
  • Safely apply tooltip text only when input is focused

Issues Fixed

Closes #137
Closes #139
Closes #142

Tested

  • Editor.js v2.x
  • React + Vite
  • Chrome (latest)

@zoherr
Copy link
Author

zoherr commented Dec 26, 2025

This PR addresses three related issues caused by Enter key propagation and missing input focus.
Happy to adjust if maintainers prefer a different approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tooltip input closes immediately on click and tooltip text is not applied Enter a Tooltip popup closes right away Pressing 'Enter' causes error

1 participant