mirror of
https://github.com/mozilla/pdf.js.git
synced 2026-06-05 09:41:01 +02:00
Merge pull request #21378 from wooorm/wooorm/fix-selection-rendering-off
Fix broken `enableSelectionRendering: false`
This commit is contained in:
commit
e9a946ec0b
@ -1071,6 +1071,9 @@ class PDFPageView extends BasePDFPageView {
|
||||
},
|
||||
abortSignal: this.#abortSignal,
|
||||
});
|
||||
if (this.enableSelectionRendering) {
|
||||
this.textLayer.div.classList.add("selectionRendering");
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
|
||||
@ -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 */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user