Commit 6ddcd04
fix(cdk/overlay): fix wrong overflow calculation (#17791)
* fix(cdk/overlay): fix wrong overflow calculation
overflowBottom is currently calculated with viewport.bottom (which could be any number from the height of the viewport to as large as your page is)
calculating the overflow should just be difference between "overlay.height added to the current coordinate on the overlay container" and the height of the viewport, not the height of the entire page.
* fix(popover-edit): fix failing test
Tested component should always fit within the viewport.
Pane dimensions should be approximately compared.
* avoid flaky errors due to narrow viewport width
Co-authored-by: Gobius Dolhain <Goobles@users.noreply.github.com>
Co-authored-by: Andrew Seguin <andrewjs@google.com>
(cherry picked from commit d2b499d)1 parent 237a6cc commit 6ddcd04
File tree
2 files changed
+15
-5
lines changed- src
- cdk/overlay/position
- material-experimental/popover-edit
2 files changed
+15
-5
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
615 | | - | |
| 614 | + | |
| 615 | + | |
616 | 616 | | |
617 | 617 | | |
618 | 618 | | |
| |||
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
223 | 228 | | |
224 | 229 | | |
225 | 230 | | |
| |||
265 | 270 | | |
266 | 271 | | |
267 | 272 | | |
268 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
269 | 279 | | |
270 | 280 | | |
271 | 281 | | |
| |||
0 commit comments