Closed Bug 1729292 Opened 4 years ago Closed 4 years ago

Input of type date does not respect scroll-margin CSS

Categories

(Core :: Layout: Form Controls, defect)

Firefox 91
defect

Tracking

()

RESOLVED FIXED
94 Branch
Tracking Status
firefox94 --- fixed

People

(Reporter: v.gorte, Assigned: emilio)

Details

Attachments

(1 file, 1 obsolete file)

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

Steps to reproduce:

Have a form with multiple input fields (text, number, date, etc) on a webpage with a fixed header. Since the form validation causes the invalid input field to be scrolled to (top of the viewport), the input field would be obscurred by the fixed header. Use scroll-margin-top to account for fixed header height when the form causes scrolling

Codepen minimal code example:
https://codepen.io/xxxdoTest/pen/NWgrBQM

Actual results:

scroll-margin is respected by all types of input fields, except for date input fields.

Expected results:

date input fields should respect the scroll-margin.

The Bugbug bot thinks this bug should belong to the 'Core::Layout: Scrolling and Overflow' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Layout: Scrolling and Overflow
Product: Firefox → Core
Assignee: nobody → emilio
Status: UNCONFIRMED → NEW
Component: Layout: Scrolling and Overflow → Layout: Form Controls
Ever confirmed: true
Flags: needinfo?(emilio)

No behavior change, just drive-by cleanup (next patch adds some comments to it).

Depends on D124689

Flags: needinfo?(emilio)
Attachment #9239696 - Attachment is obsolete: true
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c1f8d56ba2aa Honor scroll margin of host when we're scrolling to a chrome-only-access element. r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/30370 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 94 Branch
Upstream PR merged by moz-wptsync-bot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: