Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Switching from ui select to select input closes it #1408

Closed
iuriikhrystiuk opened this issue Jan 27, 2016 · 3 comments · Fixed by #1410
Closed

Switching from ui select to select input closes it #1408

iuriikhrystiuk opened this issue Jan 27, 2016 · 3 comments · Fixed by #1410

Comments

@iuriikhrystiuk
Copy link
Contributor

Guys,

The problem could be seen on following plunker: http://plnkr.co/edit/Zv5uKfv5AiWYjc0gCWQw?p=preview

Steps are following: open ui-select. Do not select anything. Click to select control. It is opened and instantly closed. Some investigation in the sources showed, that there is a method, that tracks clicks on page and for some reason it does not include 'select' into its array of focusable items.

The question is: can someone fix this issue? Because the workaround is quite complex.

@user378230
Copy link
Contributor

I'm guessing https://github.com/angular-ui/ui-select/blob/master/src/uiSelectDirective.js#L154 is the line you are talking about.

var focusableControls = ['input','button','textarea'];

You could submit a PR to fix it.

@iuriikhrystiuk
Copy link
Contributor Author

Ok, lemme work on it.

iuriikhrystiuk added a commit to iuriikhrystiuk/ui-select that referenced this issue Jan 28, 2016
fix: stop <select> from closing

Stop <select> from closing when focusing it from ui-select

Closes angular-ui#1408
@iuriikhrystiuk
Copy link
Contributor Author

Sorry for so many changes. This is the first time I am contributing into github project.

aaronroberson added a commit that referenced this issue Jan 28, 2016
fix(uiSelectDirective): stop select from closing

Stop select from closing when focusing it from ui-select

Closes #1408
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants