From be863d198bffba0a2d93bc0199bc8829cf8cb475 Mon Sep 17 00:00:00 2001 From: Joni Marques Date: Tue, 27 Jan 2015 11:19:35 +0100 Subject: [PATCH] condition parseInt(navigator.appVersion,10) <= 6 is only valid for IE5 and bellow --- jquery.select-to-autocomplete.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jquery.select-to-autocomplete.js b/jquery.select-to-autocomplete.js index 9791c6d..1888099 100755 --- a/jquery.select-to-autocomplete.js +++ b/jquery.select-to-autocomplete.js @@ -143,8 +143,9 @@ THE SOFTWARE. var public_methods = { init: function( customizations ) { - - if ( /msie/.test(navigator.userAgent.toLowerCase()) && parseInt(navigator.appVersion,10) <= 6) { + var userAgent = navigator.userAgent.toLowerCase(); + + if ( /msie/.test(userAgent) && parseFloat((userAgent.match(/.*(?:rv|ie)[\/: ](.+?)([ \);]|$)/) || [])[1]) <= 6) { return this;