Answer the question
In order to leave comments, you need to log in
What's wrong with onblur?
DEMO
Add an element to the list, and then click for example on the login and remove all text from the input.
And click anywhere on the page. What will happen?
The idea is to auto-save the old value if the field has been cleared. But onblur does not always work. If you clear the input and click on another input or on another element to edit, the values are restored. And if it's just on the page, then no.
Thus event, judging by lines in the console works.
I xs, I've been fighting for 2 hours already ...
Answer the question
In order to leave comments, you need to log in
The decision, as usual, came after smoking the documentation ))
I added the ng-blur="restore()" directive to the input, and in the restore() method I restore the old value.
Perhaps a crutch, but such a solid, strong))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question