You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Repository navigation
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Yes we do.
Otherwise why would we need $dirty or $valid? We could handle those by some custom directives. But this is not what angular is about.
So I think form.$focused is definitively needed.
Reacted by Jarrod Mosen, Johan | Yogabuild and Wayne F. Kaskie, Sr.
Consider situation where error "This field does not pass validation" is shown even when input is focus. User would be annoyed seeing the error message as he's intending to enter the right text.
@poonwu, this is what .ng-touched/ng-untouched are for (although not exactly the same as focus).
A focus specific class might indeed be needed in some applications, but we don't want to clutter the core with stuff that may be unused by most. Especially since this is trivial to implement outside of core.
+1
I agree that it would still be useful. Similar to what @poonwu mentions - Many use cases exist where one may want to show validation-specific messages or styles for fields once $touched is true, but only if the field does not have focus. $focused would certainly help.
As explained in #903 (comment), I still believe this is not something that belongs in core. It is not as often needed and is pretty easy to implement as a standalone directive (and even distribute as a 3rd-party module). Especially since Angular (2+) doesn't support it either afaik, I would be very hesitant about adding it to AngularJS (1.x).
Activity
mpaulucci commentedon Oct 23, 2012
+1
celmaun commentedon Nov 30, 2012
+1 👍 Already implemented in my app :)
btford commentedon Aug 24, 2013
As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months.
Please try the newest versions of Angular (
1.0.8and1.2.0-rc.1), and if the issue persists, comment below so we can discuss it.Thanks!
thauber commentedon Nov 21, 2013
Unless I'm reading the docs wrong, this is still an issue.
btford commentedon Nov 21, 2013
You can just use
ngFocus: http://docs.angularjs.org/api/ng.directive:ngFocusNot sure you really need this.
LukeSkyw commentedon Jul 17, 2014
Yes we do.
Otherwise why would we need $dirty or $valid? We could handle those by some custom directives. But this is not what angular is about.
So I think form.$focused is definitively needed.
turquoiseowl commentedon Oct 8, 2014
+1
Jakobovski commentedon Oct 9, 2014
+1
parliament718 commentedon Oct 24, 2014
+1 This is definitely needed. Consider the situation:
I can do:
input:focus + .input-group-addon .glyphicon { color: $focusColor; }But I cannot do this if I want the icon-group-addon before the input. $focus flag on form models would solve this.
wub commentedon Nov 24, 2015
+1
danmoc commentedon Mar 3, 2016
+1
tomjwilliamson commentedon Mar 11, 2016
+1
poonwu commentedon Mar 22, 2016
+1
Consider situation where error "This field does not pass validation" is shown even when input is focus. User would be annoyed seeing the error message as he's intending to enter the right text.
gkalpak commentedon Mar 22, 2016
@poonwu, this is what
.ng-touched/ng-untouchedare for (although not exactly the same asfocus).A
focusspecific class might indeed be needed in some applications, but we don't want to clutter the core with stuff that may be unused by most. Especially since this is trivial to implement outside of core.agscheidle commentedon Apr 14, 2016
+1
I agree that it would still be useful. Similar to what @poonwu mentions - Many use cases exist where one may want to show validation-specific messages or styles for fields once $touched is true, but only if the field does not have focus. $focused would certainly help.
anmarcek commentedon Nov 8, 2016
+1
dmaster7 commentedon Dec 27, 2016
+1 - this flag can definitely come useful in many cases.
camt commentedon Mar 20, 2017
+1
johandelforge commentedon Mar 26, 2017
+1
wub commentedon Mar 26, 2017
@btford Any idea on this one? Or is it gone for good? It seems you've had people chiming in on this for almost 5 years now.
Cheers
gkalpak commentedon Mar 27, 2017
As explained in #903 (comment), I still believe this is not something that belongs in core. It is not as often needed and is pretty easy to implement as a standalone directive (and even distribute as a 3rd-party module). Especially since Angular (2+) doesn't support it either afaik, I would be very hesitant about adding it to AngularJS (1.x).
SarikaVanapalli commentedon Apr 19, 2017
+1
sidhujaspreet commentedon Sep 26, 2017
+1
keremkayhan commentedon Oct 16, 2017
+1
r0ssIV commentedon Feb 27, 2018
+1
Damn, they don't undserstand.