Skip to content

Validation causes temporary flicker to invalid state CSS #673

@hlascelles

Description

@hlascelles

When tabbing out of a valid field (and the field moves from isModified false => true), calls are made to the css handler that temporarily put it into an invalid state.

The changed that caused this was this one, where the function declaration order of the h_obsValidationTrigger and setError functions are reversed.

This is demonstrated in a simple JSFiddle here: https://jsfiddle.net/hlascelles/3Lz5ug8x/9/

The symptom is that any triggers/hooks that listen for DOM changes or CSS changes will fire even though the user did nothing wrong. In the example, this is shown using a CSS transition, which causes a form flicker.

Why was the method order reversed in that other PR? Could it be changed back?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions