Closed
Description
measureRangeSize
in CdkVirtualForOf
uses the Elements getBoundingClientRect method to measure width or height of the DOM elements in the range. Unfortunately, this method ignores margins...
The method measureRangeSize
in the CdkVirtualScrollViewport
uses the one from CdkVirtualForOf
and therefore has the same problem.
Expected Behavior
measureRangeSize
should measure the total combined size of the elements in the given range.
Actual Behavior
Margins are ignored, leading to the method not actually returning the size of the complete range but rather the sum of sizes of all its element without the margins that may be between them.
Environment
- Angular: 7.x - current (at least 10.0.1)
- CDK/Material: 7.x - current (at least 10.0.1)
- Browser(s): should be all
- Operating System (e.g. Windows, macOS, Ubuntu): all