angular-strap icon indicating copy to clipboard operation
angular-strap copied to clipboard

Select breaks after first selection

Open jhunken opened this issue 12 years ago • 4 comments

The select directive stops working after selecting an option. I have to click elsewhere on the page to take focus from the select in order for it to work again.

To reproduce just go to the official docs: http://mgcrea.github.io/angular-strap/##selects

Click on the 'Single select' example and select an item. Attempt to use the select directive again, but the dropdowns don't appear. At this point you have to click elsewhere on the page to take focus away before the select will work again.

I see identical behavior in Chrome, FF, and Safari.

jhunken avatar Apr 09 '14 06:04 jhunken

same problem here. need to 'unfocus' then able to select.

chakming avatar Apr 09 '14 12:04 chakming

Hoping this gets fixed soon.

espositocode avatar Apr 13 '14 00:04 espositocode

Behind the scenes bsSelect uses tooltip factory, which provides its own hide method with the blur parameter. If this parameter provided and has true value than tooltip component triggers blur on underlying element: https://github.com/mgcrea/angular-strap/blob/master/src/tooltip/tooltip.js#L248

Here the hide method, which was populated by tooltip factory used without the blur param: https://github.com/mgcrea/angular-strap/blob/master/src/select/select.js#L195

I have not time to dive deeper into the code, but if use underlying hide method with the true-valued blur than select works as expected.

P.S. if select value using keyboard than controls lost their tab-navigation order...

oaleynik avatar Apr 17 '14 17:04 oaleynik

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 26 '19 21:01 lock[bot]