-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Leaving the ui-select element does not trigger a "blur" event #499
Comments
+1 |
+1 I know is pain in the neck, but this workaround worked for me #432 (comment) BTW if you need to use (like me) angular 1.2.x use $watch instead of $watchGroup. |
+1 |
Hi, is there any progress made on this issue? thanks :) |
None of the suggested workarounds seem to work with the latest version of Angular and ui-select. |
Is there any progress made on this issue? |
I have the same problem :( |
still a problem, any progress? |
Still looks like an issue. Going to try ttonyh's workaround. |
My work around for now was to put a watch on the ng-model field that the ui-select is bound to. Then when the value changes I can handle it how I want. $scope.$watchGroup(['item.Make', 'item.Model'], function (newValue, oldValue) { |
Depending on how your model is setup, that watcher can help, but it can add performance concerns. This really needs a blur event, not only to keep things performant, but also to work similarly to other input widgets out there today. |
+1 |
PRs welcome. |
I stumbled upon this and thought it would be helpful and although my issue wasn't exactly the same, I too didn't get any trigger on the "blur" event so hopefully this will point you in the right direction. I needed to bind "click" and "blur" events for a reusable directive. When adding the directive to a
The select box HTML would look like this:
|
+1 |
I ended up replacing all of the angular ui-select's with angular- uibootstraps typeahead control because the inability to use the blur event with this control. |
+1 |
I've come with a workaround to this problem.
You can't use the scope to pass the function for this directive because the ui-select directive is already using it, but you can access it from the $parent. |
Any progress??? |
+1 |
Is this problem resolved or not? |
In my project we use a directive with the ui-select and i show a label animation when the user starts entering text into an inputfield. I suppose it can also be used with a blur event:
|
Why not bind to the blur event on click of the select?
|
Maybe somebody can investigate the root cause/ problem and have a good fix in the library? Thanks |
There is any fix yet for this issue ? |
+1 |
There are this directive: From Wiki: uis open close. |
+1 |
@marcbachmann Thanks! |
@chinanderm I don't need any credits for that. |
The inner
input
element of theui-select
does generate a blur, but this should bubble up and trigger on theui-select
element itself so that it can be used in form validation, etc.The text was updated successfully, but these errors were encountered: