Repository navigation
Commit 39e4d72
fix: show grid tooltip on partially visible cells (#12996)
## Description
Fixes vaadin/flow-components#10350
Related to #7749, #10728
#7749 added a check that showed the cell tooltip only when the whole
cell was visible, because the tooltip could go outside the viewport
(#7744). Since #10728 (25.1), the tooltip itself stays inside the
viewport, so the check is no longer needed. The check also had a side
effect: a cell wider than the area next to frozen columns could never be
fully visible, so its tooltip never showed.
- Removed the full visibility check from the grid, so the cell tooltip
shows on hover and keyboard focus whenever part of the cell is visible
- Changed the `cell not fully visible` integration tests to expect the
tooltip for cells cut at the grid edges and cells partially covered by
frozen and frozen-to-end cells, in LTR and RTL
- Added integration tests for keyboard focus on a partially visible cell
and for a cell wider than the area next to a frozen column
As a test, I checked the provided example in the linked issue in a
narrow viewport, and confirmed that the tooltip stays inside the
viewport and that the text wraps:
<img width="214" height="234" alt="image"
src="https://github.com/user-attachments/assets/e9f4a383-9be3-4dc5-b52b-edc06a2c3b9e"
/>
## Type of change
- Bugfix
## How to test
1. Run `yarn start` and open `dev/grid.html`
2. Make the browser window about 400px wide, so the first non-frozen
column is wider than the space next to the frozen columns
3. Hover a cell in the first non-frozen column and wait for the tooltip
4. The tooltip shows and stays inside the viewport
5. Scroll the grid so that a column is cut at the right edge, then hover
one of its cells
6. The tooltip shows and stays inside the viewport
> [!NOTE]
> This change depends on the viewport constraint from #10728, so it
should only be backported to 25.1 and later.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 27ca393 commit 39e4d72
2 files changed
Lines changed: 26 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | | - | |
682 | | - | |
683 | | - | |
684 | | - | |
685 | 681 | | |
686 | 682 | | |
687 | 683 | | |
| |||
693 | 689 | | |
694 | 690 | | |
695 | 691 | | |
696 | | - | |
697 | | - | |
698 | | - | |
699 | | - | |
700 | | - | |
701 | | - | |
702 | | - | |
703 | | - | |
704 | | - | |
705 | | - | |
706 | | - | |
707 | | - | |
708 | | - | |
709 | | - | |
710 | | - | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | | - | |
720 | | - | |
721 | | - | |
722 | | - | |
723 | 692 | | |
724 | 693 | | |
725 | 694 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | | - | |
| 289 | + | |
290 | 290 | | |
291 | | - | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
292 | 299 | | |
293 | 300 | | |
294 | 301 | | |
| |||
303 | 310 | | |
304 | 311 | | |
305 | 312 | | |
306 | | - | |
| 313 | + | |
307 | 314 | | |
308 | 315 | | |
309 | 316 | | |
| |||
312 | 319 | | |
313 | 320 | | |
314 | 321 | | |
315 | | - | |
| 322 | + | |
316 | 323 | | |
317 | 324 | | |
318 | | - | |
| 325 | + | |
319 | 326 | | |
320 | 327 | | |
321 | 328 | | |
| |||
324 | 331 | | |
325 | 332 | | |
326 | 333 | | |
327 | | - | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
328 | 346 | | |
329 | 347 | | |
330 | 348 | | |
| |||
0 commit comments