Sander-

The problem is the order of execution.

When you attempt to click the button, that causes the blur event to fire on 
the input.  That blur causes the validation to execute.  Now that the input 
is valid, the error message is hidden (and shifts the button up and out 
from under the mouse).  So now when the click even is fired, it's no longer 
over the button thus no click event.

Even the Angular examples (https://docs.angularjs.org/guide/forms) show 
error messages below the inputs hat hide/show as needed so I can't imagine 
I'm the only one to hit this issue.  The only difference is they validate 
on keypress versus on blur.

I've solved this before (outside of angular) with custom validation logic 
by simply delaying when the message disappears by a handful of 
milliseconds.  I'm wondering if Angular has an option to do the same

Thanks,
Kevin

On Thursday, July 16, 2015 at 2:00:47 AM UTC-6, Sander Elias wrote:

> Hi Kevin,
>
> You might use animations to trigger a slow-down. However, I'm not sure 
> that showing and hiding error-messages that move around the UI is a good 
> idea. 
> BTW, there is something that makes me wonder. If you scroll down, focus 
> stay's on the input right?
> it only looses focus, when you click on the button right?
> So how can miss the button, if the hiding of the error didn't happen yet?
>
> Regards
> Sander
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to