Commit 1e075f6
authored
fix(painter-dom): skip non-scrollable scroll container in virtualization (SD-2199) (#2383)
Only first 7 pages rendered on documents with 8+ pages when SuperDoc was
mounted inside an unconstrained flex layout. The scroll container detection
found an ancestor with overflow:auto CSS but that element was never actually
scrollable because its parent only had min-height (no height constraint).
The element grew to fit content instead of constraining it, so scrollTop
stayed at 0 and the virtual window never advanced beyond pages 0-6.
The fix adds a runtime check in updateVirtualWindow() that verifies the
scroll container is actually scrollable (scrollHeight > clientHeight)
before using its scrollTop. When the container is not scrollable, it falls
through to the viewport-based getBoundingClientRect calculation which works
correctly with window-level scrolling.1 parent 3e74426 commit 1e075f6
2 files changed
Lines changed: 72 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1799 | 1799 | | |
1800 | 1800 | | |
1801 | 1801 | | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1802 | 1809 | | |
1803 | 1810 | | |
1804 | | - | |
| 1811 | + | |
1805 | 1812 | | |
1806 | 1813 | | |
1807 | 1814 | | |
| |||
1811 | 1818 | | |
1812 | 1819 | | |
1813 | 1820 | | |
1814 | | - | |
1815 | | - | |
| 1821 | + | |
| 1822 | + | |
1816 | 1823 | | |
1817 | | - | |
| 1824 | + | |
1818 | 1825 | | |
1819 | 1826 | | |
1820 | 1827 | | |
| |||
Lines changed: 61 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 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 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
689 | 750 | | |
0 commit comments