Fix find highlighting regression from #13306.

When we insert extra spans for highlighting we want
them to be positioned normally instead of absolute or
relative.

Fixes #13345.
This commit is contained in:
Brendan Dahl 2021-06-01 15:25:40 -07:00
parent 3456ed271b
commit 1da42e8b8e
2 changed files with 5 additions and 2 deletions

View File

@ -34,13 +34,16 @@
}
.textLayer .highlight {
position: relative;
margin: -1px;
padding: 1px;
background-color: rgba(180, 0, 170, 1);
border-radius: 4px;
}
.textLayer .highlight.appended {
position: initial;
}
.textLayer .highlight.begin {
border-radius: 4px 0 0 4px;
}

View File

@ -239,7 +239,7 @@ class TextLayerBuilder {
const node = document.createTextNode(content);
if (className) {
const span = document.createElement("span");
span.className = className;
span.className = `${className} appended`;
span.appendChild(node);
div.appendChild(span);
return;