Commit cc00a74
authored
fix(material/tabs): avoid pagination infinite loop in safari (#29121)
Fixes a bug reported internally where the tabs pagination was going into an infinite loop at some widths.
The root cause is a bit unclear, but it looks like in some cases Safari rounds up the `scrollWidth` and in some it doesn't which we end up hitting when adding/removing the pagination.
These changes work around it by adding a 5px threshold that needs to be crossed before we start showing the pagination. The threshold shouldn't be noticable for users since the tabs have a 24px padding on each side.1 parent 233c8a3 commit cc00a74
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
554 | | - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
555 | 565 | | |
556 | 566 | | |
557 | 567 | | |
558 | 568 | | |
559 | 569 | | |
560 | 570 | | |
| 571 | + | |
561 | 572 | | |
562 | 573 | | |
563 | | - | |
564 | | - | |
565 | 574 | | |
566 | 575 | | |
567 | 576 | | |
| |||
0 commit comments