ui-select icon indicating copy to clipboard operation
ui-select copied to clipboard

Is there any way to handle focus event, may be with ng-focus?

Open synergetic opened this issue 12 years ago • 8 comments

I'd like to execute function when ui-select is focused. ng-focus seems doesn't work. Is there any workaround?

synergetic avatar Oct 25 '14 13:10 synergetic

+1

http://plnkr.co/edit/AKbBkaB9j2th5epopGKF?p=preview

wastedUltimate avatar Nov 05 '14 18:11 wastedUltimate

+1

noullet avatar Apr 02 '15 14:04 noullet

+1

saigiridhar21 avatar Jul 29 '15 01:07 saigiridhar21

Using ng-click instead of ng-focus, I have solved this issue.

Here is the plucker link: http://plnkr.co/edit/VDZ41AIcd5cYwdA9fFPu?p=preview

saigiridhar21 avatar Jul 29 '15 16:07 saigiridhar21

ng-click doesn't solve the issue as the event is not triggered if I tab into the select.

jraguilo avatar Sep 16 '15 19:09 jraguilo

Yes, it will not work with the tab.

http://plnkr.co/edit/mysfJSlwETooBPP35zzz?p=preview I have tried to some extent using ng-keypress directive, but was not completely successful. For my present changes, one needs to do tab+enter+tab+enter, then, it will show the drop-down with correct values.

saigiridhar21 avatar Sep 17 '15 15:09 saigiridhar21

I had to create a custom directive to do some focus management for work - PRs are welcome for this.

wesleycho avatar Mar 27 '16 07:03 wesleycho

For me it worked fine using the uis-open-close directive .

I used it to display status messages while performing remote filtering but only when select has focus.

luizgrs avatar Nov 18 '16 11:11 luizgrs