[PR #24593] Fix tooltip visibility issues during scroll in model selector popup #30708

Closed
opened 2026-02-21 20:48:04 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/24593

State: closed
Merged: Yes


Fixes #24490 - Tooltip remains visible when anchor origin is not

Summary

The Problem

The tooltip system in your codebase only manages tooltip visibility through hover and click events. When a user scrolls, the tooltip doesn't automatically detect that its anchor element has moved out of view, so it stays visible even when it should be hidden.

The Result

Now when users scroll in the model selector popup, any open tooltips automatically close, preventing them from appearing in wrong positions or becoming detached from their trigger elements. This creates a much better user experience without the complexity of tracking individual tooltip visibility states.

Screenshots

Before After
before Adobe Express - after

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/24593 **State:** closed **Merged:** Yes --- Fixes #24490 - Tooltip remains visible when anchor origin is not ## Summary <!-- Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. --> ### The Problem The tooltip system in your codebase only manages tooltip visibility through hover and click events. When a user scrolls, the tooltip doesn't automatically detect that its anchor element has moved out of view, so it stays visible even when it should be hidden. ### The Result Now when users scroll in the model selector popup, any open tooltips automatically close, preventing them from appearing in wrong positions or becoming detached from their trigger elements. This creates a much better user experience without the complexity of tracking individual tooltip visibility states. ## Screenshots | Before | After | |--------|-------| |![before](https://github.com/user-attachments/assets/80065785-3c4b-4dfa-8058-dadb538a7c17) | ![Adobe Express - after](https://github.com/user-attachments/assets/cf3a27d6-bff8-4716-93a5-3520774257b3) | ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:48:04 -05:00
yindo closed this issue 2026-02-21 20:48:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30708