fix: support text selection under search highlights
This commit is contained in:
parent
ec71e4ed65
commit
21372f6a58
@ -318,7 +318,8 @@ class TextLayerBuilder {
|
|||||||
|
|
||||||
const parentTextLayer = anchor.parentElement?.closest(".textLayer");
|
const parentTextLayer = anchor.parentElement?.closest(".textLayer");
|
||||||
const endDiv = this.#textLayers.get(parentTextLayer);
|
const endDiv = this.#textLayers.get(parentTextLayer);
|
||||||
if (endDiv) {
|
const anchorHighlighted = anchor.classList?.contains("highlight");
|
||||||
|
if (endDiv && !anchorHighlighted) {
|
||||||
endDiv.style.width = parentTextLayer.style.width;
|
endDiv.style.width = parentTextLayer.style.width;
|
||||||
endDiv.style.height = parentTextLayer.style.height;
|
endDiv.style.height = parentTextLayer.style.height;
|
||||||
anchor.parentElement.insertBefore(
|
anchor.parentElement.insertBefore(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user