Commit 773610f
fix: propagate menu-bar item tooltip to connector items (#9216)
## Description
The new `MenuBarTooltipController` in `@vaadin/menu-bar` 25.2.0-alpha9
(introduced in
[vaadin/web-components#11586](vaadin/web-components#11586))
short-circuits in `setTarget` when the target's item has no `tooltip`
property — it clears the target and closes the tooltip immediately.
Flow's connector built items without a `tooltip` field (tooltip text was
only stored on the wrapper component and read via a custom generator),
so menu-bar tooltips never opened.
Fix: copy `tooltip` from the wrapper component onto each item in
`menubarConnector.js` so the controller's gating check recognizes the
item as having a tooltip. The existing custom generator continues to
read the live value from `item.component.tooltip`, so updates via
`setTooltipText` still display the latest text.
Verified `MenuBarTooltipIT` passes (3/3) against local `web-components`
at `main`.
## Type of change
- Bugfix
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 708bb13 commit 773610f
2 files changed
Lines changed: 6 additions & 10 deletions
File tree
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
| 503 | + | |
513 | 504 | | |
514 | 505 | | |
515 | 506 | | |
| 507 | + | |
516 | 508 | | |
517 | 509 | | |
518 | 510 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
0 commit comments