Firefox prematurely validates 'required' form fields when value is set by JavaScript

UNCONFIRMED
Unassigned

Status

()

P3
normal
UNCONFIRMED
11 months ago
3 months ago

People

(Reporter: eoghan, Unassigned)

Tracking

56 Branch
Points:
---

Firefox Tracking Flags

(firefox57 wontfix, firefox58 wontfix, firefox59 ?)

Details

Attachments

(1 attachment)

(Reporter)

Description

11 months ago
Created attachment 8906955 [details]
firefox-invalid-form-premature.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36

Steps to reproduce:

With a form field which has the 'required' attribute set, on page load/page setup, set it the empty string via JavaScript.  Did not submit the form programmatically.


Actual results:

Input field was surrounded with a red box-shadow indicating the form was invalid, even though the user had not yet had a chance to enter any text.


Expected results:

Field should have only been validated when user attempts to submit the form.

Updated

11 months ago
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core

Updated

11 months ago
Priority: -- → P3

Updated

11 months ago
status-firefox57: --- → wontfix
status-firefox58: --- → fix-optional

Comment 2

3 months ago
I hope this can be fixed. It causes distracting red borders to appear on Angular form fields even when the user hasn't submitted or interacted with the form.
You need to log in before you can comment on or make changes to this bug.