Skip to content

Form errors are not well visible for long forms #399

Description

@jrauh01

When a form is long enough to require scrolling, a user filling it out is likely scrolled partway down before submitting. If the submission fails, onError() prepends one or more error messages to the top of the form, but the viewport is still positioned where the user was. The errors are rendered above the view port and the user has no visual indication that anything happened.

Steps to reproduce

  1. Open a page with a long CompatForm (should be scrollable).
  2. Scroll down and submit the form in a way that adds a form message.
  3. Observe: the errors at the top of the form are not visible without scrolling to top manually.

Expected behavior

I'm not quite sure what the expected behavior should be. One option could be to scroll to top automatically if an error occurs. After a failed submission the browser should scroll the first error callout into view, so the user immediately sees what went wrong. But there could be better ways to solve this.

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