Tooltips disappear after saving paragraph entities due to improper JavaScript reinitialization

Created on 8 August 2025, about 1 month ago

Problem/Motivation

When using tooltips within paragraph entities (or any AJAX-updated content), the tooltips disappear after saving the entity. This occurs because the JavaScript initialization code does not properly reinitialize tooltips for dynamically updated content.

Steps to reproduce

  1. Create a paragraph entity with a text field that uses the rich_text format
  2. Add tooltip text using the CKEditor tooltip button
  3. Save the paragraph entity
  4. Observe that the tooltip functionality is lost after the AJAX save

Proposed resolution

Fix the JavaScript behavior in js/tippy.js to properly handle AJAX context updates. The current code has a logical flaw where it uses once() on one selector but initializes tooltips on a different global selector, preventing proper reinitialization after AJAX updates.

Remaining tasks

  • Review and test the proposed patch
  • Ensure compatibility with various AJAX scenarios
  • Commit the fix to the module

User interface changes

Tooltips will now persist and function correctly after AJAX content updates, improving user experience.

API changes

None

Data model changes

None

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024