angular / angular/components

Overlays behave erratically when using Virtual Scrolling

Open
#15,550 3 comments 0 reactions 0 assignees View on GitHub
area: cdk/overlay area: cdk/scrolling P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### What is the expected behavior?
Users should be able to utilize Virtual Scrolling with the Tree without worrying about other functionality breaking.

#### What is the current behavior?
When using Tooltips on Tree Nodes in combination with Virtual Scrolling, the Tooltips appear improperly without context.

#### What are the steps to reproduce?
Apply Virtual Scrolling to a Tree and then expose Tooltips on the Tree Node Definitions.

[Demo](https://stackblitz.com/edit/simplified-material-tree-with-virtual-scroll-xkvghx?file=app%2Ftree-flat-overview-example.html) - Mousing over any of the items in the Flat Tree should display a Tool Tip containing the Node's name, seemingly randomly it does accurately display the name in the proper place, most of the time you're left with a small gray box.

Edit: I have updated the demo to include a behavior where clicking on the text of a node will display a Snack Bar containing the node's name. This is also appearing as a gray bar at the top of the screen in many situations. This seems to be related to overlays as a whole in this context.

Contributor guide

Open the contributing guide

Research direction

Start by running the linked StackBlitz demo and reproducing the tooltip and snack-bar failures with an Angular Material Tree using virtual scrolling. Trace how the Tree node overlays behave while items are recycled; done means tooltips show the correct node name in the correct place and the snack bar appears normally.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.