As I've described in my comment in #42, I believe that IE's implementation of window.getSelection() does not count a selection in a text input field as a range.
Therefore, I believe that this PR should fix #42 by checking if selection.rangeCount is 0 before calling selection.getRangeAt(0).
As I've described in my comment in #42, I believe that IE's implementation of
window.getSelection()
does not count a selection in a text input field as a range.Therefore, I believe that this PR should fix #42 by checking if
selection.rangeCount
is 0 before callingselection.getRangeAt(0)
.