Skip to content

Conversation

@kolaente
Copy link
Member

@kolaente kolaente commented Dec 9, 2025

Resolves https://community.vikunja.io/t/cannot-search-for-reaction-emoji/4207/1

Summary

  • Fixes the emoji reaction picker closing immediately when clicking inside the search box
  • The issue occurred because vuemoji-picker wraps emoji-picker-element which uses Shadow DOM
  • The closeWhenClickedOutside helper was using parentElement traversal which doesn't cross shadow boundaries

Changes

  • Updated closeWhenClickedOutside to use event.composedPath() which properly includes elements inside Shadow DOM
  • Updated Reactions.vue to pass the actual DOM element ($el) instead of the Vue component instance

Test plan

  • Open a task detail view
  • Click the emoji reaction button (smiley face) to open the picker
  • Click inside the search box
  • Verify the picker stays open and you can type to search
  • Verify clicking outside the picker still closes it
  • Test in both Firefox and Chromium-based browsers

🤖 Generated with Claude Code

The emoji picker (vuemoji-picker) uses emoji-picker-element which renders
its internal elements inside Shadow DOM. The closeWhenClickedOutside helper
was using parentElement traversal which doesn't work across shadow boundaries,
causing clicks on the search input to incorrectly trigger the close callback.

This fix:
- Uses event.composedPath() instead of parentElement traversal, which properly
  includes elements inside Shadow DOM
- Updates Reactions.vue to pass the actual DOM element ($el) instead of the
  Vue component instance

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@kolaente kolaente marked this pull request as ready for review December 9, 2025 11:04
@kolaente kolaente merged commit 798ffc0 into main Dec 9, 2025
33 checks passed
@kolaente kolaente deleted the kolaente/fix-emoji-search-close branch December 9, 2025 11:59
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