Skip to content

Commit 2307233

Browse files
authored
Update codeit.js
1 parent 60f48ac commit 2307233

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/codeit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ class CodeitElement extends HTMLElement {
152152
// if text is big, highlight cursor node first,
153153
// then highlight rest of codeit when finished typing
154154
if (cd.textContent.length > 5000 &&
155+
window.getSelection().type !== 'None' &&
155156
document.activeElement === cd) {
156157

157158
// get caret pos in text

0 commit comments

Comments
 (0)