ivirabyan / jquery-mentions

Adds mentioning support to your text fields.
http://ivirabyan.github.io/jquery-mentions/
MIT License
114 stars 49 forks source link

IE8 not supported #2

Closed argonautical closed 9 years ago

argonautical commented 9 years ago

The function setSelectionRange is not supported in IE8. Function is used on line 28. I inserted some test code based on if the function exists, and return null if it doesn't: if (input[0].setSelectionRange) { // existing code } else { return null }

This seems to make IE8 work.

ivirabyan commented 9 years ago

I don't think "doing nothing" is a good solution, it would break functionality, although you might not notice it at first glance. We should use some alternative method for IE. Thanks for the feedback.

argonautical commented 9 years ago

Sorry, didn't mean to imply that would be a permanent solution. I certainly didn't track down exactly what was being done with the returned value to know whether null would cause problems or not. I just did a quick band-aid and wanted you to know. On quick search, looks like this post might have some IE8 solutions to consider: http://stackoverflow.com/questions/1981088/set-textarea-selection-in-internet-explorer

ivirabyan commented 9 years ago

I think we just won't set selection on IE8, it doesn't influence core functionality