Deborah Deborah - 5 months ago 9
AngularJS Question

Functioning issue of angularjs dropdowns

I am using multiselect dropdowns in angular. The issue am facing is whenever any option is selected in dropdown, automatically the top of dropdown content is being displayed.
For ex; Here i have a

demo
: https://plnkr.co/edit/eGVkSPJRpddeGxcIogdd?p=preview when I check/uncheck Honda option from dropdown,automatically top of dropdown is dispalyed.

How can I make it to stay at the option which i select from dropdown. So that checking/unchecking will be easy for user.

dgk dgk
Answer

You need to edit the multiselect.js directive here is required changes from line @252

  scope.focus = function focus() {
    var searchBox = element.find('input')[0];
    //searchBox.focus();
  }

It cause the move focus up.

Comments