Skip to content

EPMRPP-111882 || Prevent tooltip from showing when focus moves to child elements#237

Merged
allaprischepa merged 1 commit intodevelopfrom
feature/EPMRPP-111882-open-tooltip-on-focus
Feb 10, 2026
Merged

EPMRPP-111882 || Prevent tooltip from showing when focus moves to child elements#237
allaprischepa merged 1 commit intodevelopfrom
feature/EPMRPP-111882-open-tooltip-on-focus

Conversation

@allaprischepa
Copy link
Contributor

@allaprischepa allaprischepa commented Feb 10, 2026

Summary by CodeRabbit

Bug Fixes

  • Fixed tooltip to display only when the triggering element itself receives focus, preventing unwanted tooltip display when focus originates from child elements.

@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Walkthrough

The tooltip component's onFocus handler was updated to check if focus occurred directly on the wrapper element itself, rather than on descendant elements. This prevents the tooltip from showing when focus originates from child components.

Changes

Cohort / File(s) Summary
Tooltip Focus Handler
src/components/tooltip/tooltip.tsx
Modified onFocus handler to only trigger tooltip display when the wrapper element directly receives focus (e.target === e.currentTarget), preventing tooltips from showing when focus originates from descendant elements.
Package Configuration
package.json
Updated package metadata (4 lines added, 1 line removed).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • AmsterGet
  • maria-hambardzumian
  • siarheirazuvalau

Poem

🐰 A hop, a skip, a focus check so tight,
No more tooltips popping from the depths of night,
Only when the wrapper's blessed with gentle care,
Will wisdom float and shimmer in the air! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: preventing tooltip display when focus moves to child elements, which aligns with the code modification in the tooltip component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/EPMRPP-111882-open-tooltip-on-focus

No actionable comments were generated in the recent review. 🎉


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@allaprischepa allaprischepa merged commit c6eadea into develop Feb 10, 2026
2 checks passed
@allaprischepa allaprischepa deleted the feature/EPMRPP-111882-open-tooltip-on-focus branch February 10, 2026 10:54
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.

2 participants