mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Fix ensureMinFontSizeComputed
calculation if <body>
is a flex container
Given: ```css html, body { height: 100%; } body { display: flex; } ``` The `<div>` appended to the `<body>` will take up the full height of the viewport due to the implicit `align-items: stretch` of flex containers. This results in an incorrect computed `minFontSize` value.
This commit is contained in:
parent
7ffea2f02a
commit
665fff020e
1 changed files with 1 additions and 0 deletions
|
@ -480,6 +480,7 @@ class TextLayer {
|
|||
div.style.opacity = 0;
|
||||
div.style.lineHeight = 1;
|
||||
div.style.fontSize = "1px";
|
||||
div.style.position = "absolute";
|
||||
div.textContent = "X";
|
||||
document.body.append(div);
|
||||
// In `display:block` elements contain a single line of text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue