Function isMsie does not work in IE11
The function isMsie does not accurately reflect Internet Explorer 11 as IE.
This likely causes several issues, one being that the Close event fires before the Selected event
Does this solve the problem ? isMsie: function() { return /(msie|trident)/i.test(navigator.userAgent); } I can't test this my self since the latet secuity update of windows 8.1 rendered my IE useless :-(
The function needs to return the version number (EG: 7, 8..11)
I used:
isMsie: function () {
var rv = -1;
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat(RegExp.$1);
}
else if (navigator.appName == 'Netscape') {
var ua = navigator.userAgent;
var re = new RegExp("Trident/.*rv:([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat(RegExp.$1);
}
return rv;
}
this is from http://stackoverflow.com/questions/17907445/how-to-detect-ie11
Aha great. bower.js https://github.com/ded/bowser/blob/master/bowser.js has a shorter version that could be applied here like:
isMsie: function() { return /(msie|trident)/i.test(navigator.userAgent) ? navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2] : false; }
However.. did the IE11 detection improuval solve the problem with dropdown click selection issue https://github.com/twitter/typeahead.js/issues/554 ?
The fix to isMsie did resolve the issue with the event firing incorrectly.
I'll have to check to see if it resolves #554 (will have to wait until tomorrow unfortunately)