Required field pop-ups are misplaced when <inputs> are hidden using CSS

RESOLVED DUPLICATE of bug 595451

Status

()

Firefox
General
RESOLVED DUPLICATE of bug 595451
7 years ago
7 years ago

People

(Reporter: paulc, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
If you have required <input>s of e.g. type="text", and they're hidden, submitting the form places the pop-up for 'Please fill out this field.' in unexpected locations.

Admittedly this is a weird scenario, but the pop-up should be next to the form if the input is not being displayed. At the very least, the worst fallback should show it inside the viewport :)

On Firefox 4 beta 10, the notification is only at the top, regardless of the window's position: http://grab.by/8JmR

On today's nightly (Feb 2nd), if there's no room at the top, the notification is shown at the bottom: http://grab.by/8Jna

Here's the HTML I used to test:

<!DOCTYPE html>
<html>
<head>
<title>Test hidden required fields</title>
</head>
<body>
<form action="">
<input type="text" required name="test" style="display: none"/>
<p>There's a hidden text input here.</p>
<input type="submit" value="Submit" name="save"/>
</form>
</body>

Comment 1

7 years ago
Duplicate of Bug 595451 ?
(Reporter)

Comment 2

7 years ago
Looks like. Thanks Alice!
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 595451
You need to log in before you can comment on or make changes to this bug.