Skip to content

Commit

Permalink
fix(text): clear selection afterwards
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfbecker committed Nov 24, 2020
1 parent 19d0ffa commit 91bed46
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export function handleTextNode(textNode: Text, context: TraversalContext): void
textSpan.textContent = selection.toString()
} finally {
parentElement.style.userSelect = previousUserSelect
selection.removeAllRanges()
}

textSpan.setAttribute('x', lineRectangle.x.toString())
Expand Down

0 comments on commit 91bed46

Please sign in to comment.