fix: support text selection under search highlights

This commit is contained in:
Matthew Lawrence 2025-11-26 16:29:13 +11:00
parent ec71e4ed65
commit 21372f6a58

View File

@ -318,7 +318,8 @@ class TextLayerBuilder {
const parentTextLayer = anchor.parentElement?.closest(".textLayer");
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.height = parentTextLayer.style.height;
anchor.parentElement.insertBefore(