Closed Bug 1888533 Opened 2 months ago Closed 2 months ago

Hidden fields reported as invalid when an input fails validation

Categories

(Core :: DOM: Forms, defect)

Firefox 124
defect

Tracking

()

RESOLVED DUPLICATE of bug 1876792

People

(Reporter: john.foreign, Unassigned)

Details

Attachments

(1 file)

Attached file test.html

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:124.0) Gecko/20100101 Firefox/124.0

Steps to reproduce:

In the form below, type "x" into input P2 and press the Submit button. The form is included in the attached file.

<form>
<label for="p1">P1:</label>
<input type="hidden" name="t1" value="P1">
<input type="text" name="p1" value="" required="true"
pattern="\s*[A-Za-z][\w.]\s">
<br/>
<label for="p2">P2:</label>
<input type="hidden" name="t2" value="P2">
<input type="text" name="p2" value=""
pattern="\s*\d*.\d+\s*">
<br/>
<button type="submit">Submit</button>
</form>

Actual results:

Two errors:

The invalid form control with name=‘t1’ is not focusable. test.html
The invalid form control with name=‘t2’ is not focusable. test.html

Expected results:

No errors -- the hidden fields should not be validated/focused.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Forms' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Forms
Product: Firefox → Core

This looks like a duplicate of bug 1876792. Please reopen if it's still a problem.

Status: UNCONFIRMED → RESOLVED
Closed: 2 months ago
Duplicate of bug: 1876792
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: