Repository navigation
Commit cab4a22
fix: only open multi-select-combo-box dropdown on label or field click (CP: 25.2) (#12766)
This PR cherry-picks changes from the original PR #12739 to branch 25.2.
---
> ## Description
>
> Depends on #12744
>
> `ComboBoxBaseMixin._onHostClick()` opens the dropdown on any click
that reaches the host. Combo-box and time-picker each override it to
open only when the click lands on the label or the input field.
Multi-select-combo-box never added that override, so clicking its helper
text or its error message opened the dropdown.
>
> - Added a `_onHostClick()` override that opens only when the click
path includes the label or the input field
> - Added the two `opening disallowed` tests that combo-box and
time-picker already have, under the same names
>
> The override lives in the mixin, next to where `_inputField` is
resolved, matching time-picker. Chips keep opening the dropdown because
they are slotted inside the input field element, so this does not change
how they behave.
>
> ## Type of change
>
> - Bugfix
>
> ## How to test
>
> 1. Open `dev/multi-select-combo-box.html`
> 2. Click the helper text below the field
> 3. The dropdown stays closed
> 4. Click the label, then the input field
> 5. The dropdown opens in both cases
>
> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>1 parent 76c8c00 commit cab4a22
2 files changed
Lines changed: 33 additions & 1 deletion
File tree
- packages/multi-select-combo-box
- src
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
453 | 468 | | |
454 | 469 | | |
455 | 470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
162 | 179 | | |
163 | 180 | | |
164 | 181 | | |
| |||
0 commit comments