Skip to content

Commit 3aaeb48

Browse files
authored
Update text-selection-active.js
1 parent fa56ec5 commit 3aaeb48

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/table/helpers/text-selection-active.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
// Accepts an element as only argument to test to see if selection overlaps or is
55
// contained within the element
66

7-
import { isELement } from '../../../utils/dom'
7+
import { isElement } from '../../../utils/dom'
88

99
export default function textSelectionActive(el = document) {
1010
const win = window
1111
/* istanbul ignore if: JSDOM doesn't support getSelection */
1212
if (win && win.getSelection && win.getSelection().toString() !== '' && isElement(el)) {
13+
const sel = win.getSelection()
1314
return sel.containsNode ? sel.containsNode(el, true) : false
1415
} else {
1516
return false

0 commit comments

Comments
 (0)