[Webkit-unassigned] [Bug 231503] REGRESSION (iOS 15.1): Cannot override background of Input element

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 27 11:21:07 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=231503

--- Comment #4 from Aditya Keerthi <akeerthi at apple.com> ---
Thank you for the test case. I can reproduce the issue.

The behavior you’re seeing is specific to <input type=search> with -webkit-appearance: textfield (which is specified in misc.css). In iOS 15, this combination yields a background color matching the default background color of <input type=text> (white). This was done so that pages which didn’t specify a background color for an <input type=search> (which has a new default background color in iOS 15), but wanted to retain the standard textfield appearance, would be able to do so. However, it appears that the change also limited styleability for that combination.

The issue does not reproduce when the search field is focused, due the following rule:

body.dark-mode :focus {
        -webkit-appearance: none;
        outline: 0;
}

Which drops the <input type=search> / -webkit-appearance: textfield condition leading to the white background.

I’m looking into a fix to restore the original behavior. In the meantime, you should be able to use one the following workarounds:

1. Use <input type=text> instead of <input type=search>
2. Specify `-webkit-appearance: none;` on the search input in misc.css (instead of `textfield`)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20211027/9a28ffc7/attachment.htm>


More information about the webkit-unassigned mailing list