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:
Downgrade angular.js version to
1.3.0-beta.10
The bug is caused by this
ngIf
fixed d71df9 which is landed in1.3.0-beta.11
Downgrade angular-bootstrap version to
0.10.0
The
typeahead
directive has started to usengIf
in0.11.0
, so downgrade to0.10.0
will also works.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
Using Primefaces with Bootstrap Causes Changes in Padding/Sizing/Borders
Text Overflow Ellipsis: Avoid Word Break
CSS - Shrink a Parent Div to Fit One Child's Width and Constrain the Width of the Other Child
How to Avoid Media Query Overlap
Difference Between Flex-End and End
Why on Safari the Transform Translate Doesn't Work Correctly
Pseudo Elements and Select Tag
How to Style Menu Button and Menu Items
Nth-Child Doesn't Respond to Class Selector
iOS Forces Rounded Corners and Glare on Inputs
@Media Media Query and ASP.NET MVC Razor Syntax Clash
Less CSS: Mixins with Variable Number of Arguments
CSS Select First Element with a Certain Class
Any Way to Remove Ies Black Border Around Submit Button in Active Forms
Multiple Image Cross Fading in CSS - Without (Java) Script
Placing Background Image in a Rhombus Shaped Container Is Causing the Container to Lose Its Shape