fix(tags): focus kbqTagInput on click/focus (#DS-4345)#1102
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the tag component's click handling behavior by changing from mousedown to click events and simplifying the focus management logic. The main goal is to improve the user experience by ensuring the tag input receives focus when clicking anywhere in the tag list or on tags (unless using modifier keys for selection).
- Changed event binding from
mousedowntoclickfor tag interaction - Simplified
handleClickmethod to only handle selection with modifier keys, allowing click events to bubble up to the tag list - Removed
originatesFromTaghelper method and simplifiedonContainerClickto always focus the input - Updated
focus()method to prioritize tag input over tags
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/public_api_guard/components/tags.api.md | Updated public API signatures to reflect handleClick replacing handleMousedown and onContainerClick parameter removal |
| packages/components/tags/tag.component.ts | Changed event handler from mousedown to click and simplified logic to only handle modifier key selections |
| packages/components/tags/tag.component.spec.ts | Updated all tests to use click events instead of mousedown events |
| packages/components/tags/tag-list.component.ts | Simplified onContainerClick to always focus, removed originatesFromTag method, and refactored focus() method to prioritize input |
| packages/components/tags/tag-list.component.spec.ts | Added new tests for focus behavior and updated imports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Visit the preview URL for this PR (updated for commit 32a79c3): https://koobiq-next--prs-1102-rz94n8xd.web.app (expires Wed, 12 Nov 2025 12:51:24 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
No description provided.