fix: page scrolls up and the header goes off screen when previewing a scanned PDF (#32487)

Opening a PDF without any text, such as a scan, in the knowledge base file viewer scrolled the whole page up. The workspace tabs, the knowledge base header and the viewer toolbar went off screen and a blank block appeared at the bottom. Scanned PDFs now open with the page in place, the same as PDFs with text.

Fixes #32481
This commit is contained in:
Classic298 2026-10-16 01:00:24 +02:00 • committed by GitHub
parent a89b05f6f9
commit 1bc5648a7b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -687,4 +687,9 @@
:global(.textLayer.selecting .endOfContent) {
top: 0;
}
/* pdfjs leaves its text-measuring canvas in <body> at 300x150 for PDFs without text */
:global(.hiddenCanvasElement) {
display: none;
}
</style>