diff --git a/index.js b/index.js index 4d4c450..1009a44 100644 --- a/index.js +++ b/index.js @@ -15,6 +15,7 @@ function clipboardCopy (text) { win.document.body.appendChild(span) var selection = win.getSelection() + if (selection === null) selection = document.getSelection() var range = win.document.createRange() var success = false