Up/Down Arrow Key Issue with Typeahead Control (Angular Bootstrap Ui)

up/down arrow key issue with typeahead control (angular bootstrap UI)

Here is the working plunker

In this I have override ui-bootstrap typeahead as suggested in the answer.

Following are the changes I need to make it work:

Added following line in typeaheadMatch directive (line - 335 of ui.bootstrap.typeahead.js file in the plunker)

element[0].focus();

Added shouldFocus directive (line - 314 -350)

.directive('shouldFocus', function(){
return {
restrict: 'A',
link: function(scope,element,attrs){
scope.$watch(attrs.shouldFocus,function(newVal,oldVal){
element[0].scrollIntoView(false);
});
}
};
})

and finally added directive in li (line - 372)

should-focus=\"isActive($index)\"

How to add Up/down scroll for ngx-bootstrap typeahead?

I use ngx-bootstrap '3.0.0' and it works.
5 items in the list with scrollbar,
then cursor down serveral times, and the items scroll.
On the demo page (https://valor-software.com/ngx-bootstrap/#/typeahead, at Scrollable you can also verify that it works as you want.

allow arrowkey movement in typeahead bootstrap

This issue has been reported here.
It seems that they fixed it according to another issue and then broke it again in 2.04. This may not be the case, it's just a guess. I tried it in Firefox and it's broken for me as well as you said.

I would suggest finding a copy of 2.03 and see if that works. (you can probably look for an older revision on the bootstrap repository @ https://github.com/twbs/bootstrap

This mentions that they are aware and plan on fixing the issue in 2.1.0. And 2.03 should work.

Angular bootstrap typeahead not working with Angular 1.3.0

You have three choices currently:

  1. Downgrade angular.js version to 1.3.0-beta.10

    The bug is caused by this ngIf fixed d71df9 which is landed in 1.3.0-beta.11

  2. Downgrade angular-bootstrap version to 0.10.0

    The typeahead directive has started to use ngIf in 0.11.0, so downgrade to 0.10.0 will also works.

  3. Wait for angular-bootstrap 0.12.0

    There is already an open issue #2474 , it's planned to be fixed in 0.12.0

EDIT: It seems the issue has been fixed by this commit a0be450d and landed in 0.11.2.



Related Topics



Leave a reply



Submit