Fix broken enableSelectionRendering: false

Closes GH-21374.
Related-to GH-20981.
This commit is contained in:
Titus Wormer 2026-06-02 12:57:04 +02:00
parent b43ef1c746
commit a8cf37f6bc
No known key found for this signature in database
GPG Key ID: E6E581152ED04E2E
2 changed files with 15 additions and 1 deletions

View File

@ -1067,6 +1067,9 @@ class PDFPageView extends BasePDFPageView {
},
abortSignal: this.#abortSignal,
});
if (this.enableSelectionRendering) {
this.textLayer.div.classList.add("selectionRendering");
}
}
if (

View File

@ -118,7 +118,18 @@
}
::selection {
background: transparent;
/* stylelint-disable declaration-block-no-duplicate-properties */
/*#if !MOZCENTRAL*/
background: rgba(0 0 255 / 0.25);
/*#endif*/
/* stylelint-enable declaration-block-no-duplicate-properties */
background: color-mix(in srgb, AccentColor, transparent 50%);
}
&.selectionRendering {
::selection {
background: transparent;
}
}
/* Avoids https://github.com/mozilla/pdf.js/issues/13840 in Chrome */