New issue
Advanced search Search tips

Issue 884696 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Nov 1
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

:placeholder-shown matches an INPUT with non-empty value

Reported by jeremia....@gmail.com, Sep 17

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/69.0.3497.81 Chrome/69.0.3497.81 Safari/537.36

Steps to reproduce the problem:
1. I use an external stylesheet to define a placeholder color for the input element
2. I render the input element in a React component
3. The placeholder attribute of the input bases on the local state of that component

What is the expected behavior?
The text color of the input is the default one, because it was never defined in a stylesheet

What went wrong?
The text color of the input is equal to the placeholder color

Did this work before? N/A 

Chrome version: 69.0.3497.81  Channel: n/a
OS Version: 69.0.3497.81
Flash Version: 

I created a minimal code snippet on Stackoverflow:
 https://stackoverflow.com/questions/52369649/text-input-color-equals-placeholder-color-in-react-app
 
http://my-input.surge.sh/ shows an example of the bug
Labels: Needs-Triage-M69
Labels: Triaged-ET Target-71 M-71 FoundIn-71 OS-Mac OS-Windows
Status: Untriaged (was: Unconfirmed)
Able to reproduce the issue on Mac 10.13.3, Win-10 and Ubuntu 14.04 using chrome reported version #69.0.3497.81 and latest canary #71.0.3553.2.
This is a non-regression issue as it is observed from M60 old builds. 

Hence, marking it as untriaged to get more inputs from dev team.

Thanks...!!
Labels: Hotlist-DesktopUIConsider
Components: -UI Blink>Forms>Text
Labels: -Hotlist-DesktopUIConsider
Components: Blink>CSS
Labels: -M-71 -Needs-Triage-M69 -Target-71 Needs-Reduction Hotlist-Interop
Status: Available (was: Untriaged)
Summary: :placeholder-shown matches an INPUT with non-empty value (was: Text input color equals placeholder color)
Components: -Blink>CSS
Labels: -Needs-Reduction
Setting placeholder attribute immediately followed by setting the value attribute of an input will not update placeholder visibility correctly.

placeholder.html
245 bytes View Download
Labels: Hotlist-GoodFirstBug
Cc: futhark@chromium.org
Hi, Can I try this issue?
Status: Assigned (was: Available)
> Can I try this issue?

Please go ahead.

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 1

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/4410851849fa63e584853c41f4ad7755ce4f7445

commit 4410851849fa63e584853c41f4ad7755ce4f7445
Author: HyeockJinKim <kherootz@gmail.com>
Date: Thu Nov 01 09:27:47 2018

Always update placeholder's visibility

Always call SetPlaceholderVisibility if !placeholder
to prevent :placeholder-shown style from being applied

Bug:  884696 
Change-Id: I5f078dad825de91253bc99d133dc7978a59bbda3
Reviewed-on: https://chromium-review.googlesource.com/c/1292666
Reviewed-by: Kent Tamura <tkent@chromium.org>
Commit-Queue: HyeockJin Kim <kherootz@gmail.com>
Cr-Commit-Position: refs/heads/master@{#604529}
[add] https://crrev.com/4410851849fa63e584853c41f4ad7755ce4f7445/third_party/WebKit/LayoutTests/external/wpt/css/selectors/selector-placeholder-shown-emptify-placeholder.html
[modify] https://crrev.com/4410851849fa63e584853c41f4ad7755ce4f7445/third_party/blink/renderer/core/html/forms/text_control_element.cc

Status: Fixed (was: Assigned)
Assuming this is fixed by the landed CL.
Labels: Target-72

Sign in to add a comment