Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard navigation issue while scrolling up-down #305

Open
alpeshkumarpr opened this issue Jun 7, 2016 · 0 comments
Open

Keyboard navigation issue while scrolling up-down #305

alpeshkumarpr opened this issue Jun 7, 2016 · 0 comments

Comments

@alpeshkumarpr
Copy link

alpeshkumarpr commented Jun 7, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant