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 controls broken in single selection mode #201

Closed
severinraez opened this issue Feb 23, 2015 · 6 comments
Closed

keyboard controls broken in single selection mode #201

severinraez opened this issue Feb 23, 2015 · 6 comments
Labels

Comments

@severinraez
Copy link

Hi

This component (v 3.0.0) raises an error if initialized as single select (see http://isteven.github.io/angular-multi-select/#/demo-single-selection-mode)

As I only need single selection, I hacked something together that works for me. I thought a pointer would be helpful to you. Changing the line

var checkboxes = element.children().children().next().children().next()[ 0 ].getElementsByTagName( 'input' );

to

var checkboxes = element.children().children().next().children()[0].getElementsByTagName('input');

resolves the issue.

@isteven isteven added the bug label Feb 23, 2015
@isteven
Copy link
Owner

isteven commented Feb 24, 2015

Hi @severinraez ,

Thanks for letting me know.

There's an underlying bug in this. Basically, it couldn't find some elements because of different DOM structure of the directive, depending on how we configure the multi select.

I'm working on a proper fix now.

@cp2587
Copy link

cp2587 commented Feb 26, 2015

+1.
Nice widget otherwise

@boje
Copy link

boje commented Feb 26, 2015

I am experience issue that seems to be related to this. If 0 or 1 disable selection in dropdown.
If I remove .next() then the problem seem to be solve.

var inputField = element.children().children().next().children().children()[0].getElementsByTagName('input');

var clearButton = element.children().children().next().children().children().next()[0].getElementsByTagName('button');

@jmls
Copy link

jmls commented Feb 27, 2015

ah, I just came across this as well. Although with a multi-select ...

@fortesl
Copy link

fortesl commented Mar 4, 2015

Happens in multi-select mode as well...

@isteven
Copy link
Owner

isteven commented May 6, 2015

Fixed in v4.0.0

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

No branches or pull requests

6 participants