From 9373ae7afef7f6a72508bf797fe21a004b3f4b6e Mon Sep 17 00:00:00 2001 From: Shane Kenney Date: Fri, 21 Mar 2014 13:32:32 +1100 Subject: [PATCH] Prevent IE 11 from using document.selection For IE 11, document.selection is no longer supported. See http://msdn.microsoft.com/en-us/library/ie/ms535869(v=vs.85).aspx for details. Updated condition so IE 11 uses selectionStart and selectionEnd. --- jquery.autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.autocomplete.js b/jquery.autocomplete.js index 497a80a..85d1812 100644 --- a/jquery.autocomplete.js +++ b/jquery.autocomplete.js @@ -824,7 +824,7 @@ $.fn.selection = function(start, end) { }); } var field = this[0]; - if ( field.createTextRange ) { + if ( document.selection ) { var range = document.selection.createRange(), orig = field.value, teststring = "<->",