Move scroll ownership from PdfCanvas to canvasContainerRef

Fixkamo-internal
Expediere
12 aprilie 2026 la 18:20 UTC
Autor
kamo
Comite
535741c

PdfCanvas root Box previously had overflow-auto + h-full, making it its own scroll container. This meant: - scrollbarGutter: stable on canvasContainerRef had no effect (it had no scrollbar) - The floating zoom control (floated right in canvasContainerRef) overlapped PdfCanvas's scrollbar sitting at the same right edge - handleFitToWidth measured canvasContainerRef.clientWidth which didn't account for PdfCanvas's scrollbar, computing a zoom slightly too large and triggering a horizontal scrollbar Removing overflow-auto and h-full from PdfCanvas's root Box lets PdfCanvas grow naturally to its content height. canvasContainerRef (overflow: auto, scrollbarGutter: stable) now owns the single scroll context, so: - The gutter is always reserved; floating control mr keeps consistent clearance - clientWidth correctly reflects available page width for fit-to-width math - scrollToPage uses scrollIntoView which finds canvasContainerRef as the scroll ancestor and works unchanged

Toate modificările

Ca ceea ce vezi de transport maritim?

Fiecare dintre aceste actualizări aterizează automat în spațiul de lucru. Începe gratuit și urmăriți-l crească săptămână după săptămână.

Pornește gratuit pentru totdeaunaVezi prețurile