Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

BootstrapValidationDecorator glitch when editing #142

Description

@Gusi

There is a minor (but frustrating) glitch when editing a previously touched field.

When the typing starts, the $invalid property of the field is set to true, so the watch inside the bootstrapValidationDecorator fires and the toggleClass method sets the "has-error" class to the decorator. One second after the typing stopped, the $invalid is set to false so the watch fires again and removes the "has-error" class.

The result is that while typing, the element is decorated in red (as I said, it only happens if the field has been previously touched).

I'm trying to figure out how to fix this, but can't find the solution. Any ideas?

(In summary, I think the solution is as simple as detecting when the field is inside the delay of 1 second to avoid showing the error during that time)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions