Open Bug 1832475 Opened 1 year ago Updated 1 year ago

<option> elements renders when <datalist> has style:"display: block"

Categories

(Core :: Layout: Form Controls, defect)

defect

Tracking

()

People

(Reporter: karlcow, Unassigned)

References

Details

Does this work in other browsers? No - I can reproduce the problem in another browser This can be reproduced in Firefox Nightly 115.
This can not be reproduced in Safari Tech Preview 169

Steps to reproduce the problem:
This was initially reported on https://bugs.webkit.org/show_bug.cgi?id=256538

  1. Go to https://jsfiddle.net/b6y3qrLz/

Problem Description:
Notice how the datalist content is visible.
It is visible on Firefox Nightly and Chrome Canary
and not visible on Safari Tech Preview 169.

The datalist element represents a set of option elements that represent predefined options for other controls. In the rendering, the datalist element represents nothing and it, along with its children, should be hidden.
https://html.spec.whatwg.org/multipage/form-elements.html#the-datalist-element

This is not happening if the datalist is bound to an input.

Datalist gets display: none without !important as per the spec, so it can be overridden.
We already special-case area after bug 135040, so perhaps the same should be done?

Severity: -- → S4
See Also: → 135040

fwiw Chromium project closed it as WONTFIX and an expected behavior.
https://bugs.chromium.org/p/chromium/issues/detail?id=1444633#c5

You need to log in before you can comment on or make changes to this bug.