Skip to content

Keyboard navigation issue while scrolling up-down #305

@alpeshkumarpr

Description

@alpeshkumarpr

Hello,

We find an issue for scrolling up & down the lists available in dropdown while navigating through keyboard. Solution is found in the question below and it works for us.

http://stackoverflow.com/questions/27705490/up-down-arrow-key-issue-with-typeahead-control-angular-bootstrap-ui

Solution:

Add below code in mm-foundation-typeahead.js. file.


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

and add attribute with li element named should-focus="isActive($index)" in typeahead-popup.html.

Looking forward to incorporate this change asap.

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions