I'm working with rails app and running bootstrap ui library. The application's working well on all browsers except <=IE8 ....
After a little time of investigations I found the part of code that was generating an error :
compiled application.js :
u.bind("keydown",function(t){0!==k.matches.length&&-1!==a.indexOf(t.which)&&(t.preventDefault(),40===t.which?(k.activeIdx=(k.activeIdx+1)%k.matches.length,k.$digest()):38===t.which?(k.activeIdx=(k.activeIdx?k.activeIdx:k.matches.length)-1,k.$digest()):13===t.which||9===t.which?k.$apply(function(){k.select(k.activeIdx)
and UI Bootstrap template uncompiled :
element.bind('keydown', function (evt) {
//typeahead is open and an "interesting" key was pressed
if (scope.matches.length === 0 || HOT_KEYS.indexOf(evt.which) === -1) {
return;
}
evt.preventDefault();
if (evt.which === 40) {
scope.activeIdx = (scope.activeIdx + 1) % scope.matches.length;
scope.$digest();
} else if (evt.which === 38) {
scope.activeIdx = (scope.activeIdx ? scope.activeIdx : scope.matches.length) - 1;
scope.$digest();
} else if (evt.which === 13 || evt.which === 9) {
scope.$apply(function () {
scope.select(scope.activeIdx);
});
} else if (evt.which === 27) {
evt.stopPropagation();
resetMatches();
scope.$digest();
}
});
Does anyone know how I can – AT LEAST – fix this bug on IE8 ?
Thanks :)