New issue
Advanced search Search tips

Issue 752362 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Search input field has unspecified "Search" placeholder text

Project Member Reported by tkent@chromium.org, Aug 4 2017

Issue description

Chrome Version: 62.0.3175.0 canary
OS: macOS 10.12.5

What steps will reproduce the problem?
(1) Open the following URL:
  data:text/html;charset=utf-8,<input type=search>

What is the expected result?
An empty text field should be shown.

What happens instead?
A text field with gray "Search" is shown.

Please use labels and text to provide additional information.
Probably, SDK update is the culprit.

 
Screen Shot 2017-08-04 at 9.44.38.png
5.6 KB View Download
This repros on Mac and not Windows. Worse, the placeholder text doesn't clear as you type over it (https://twitter.com/ericlaw/status/895458134222790658)
Curiouser and curiouser; it does seem likely to be a change in the underlying OS X control's behavior.

The "Search" string in question isn't actually the HTML5 placeholder text (if you set a |placeholder| attribute on the control, it shows on top of the default "Search" background text in a slightly darker color with a baseline a few pixels above.)

Not repro in 61.3163.
It looks like https://codereview.chromium.org/586413002 was the change that suppressed the "native" placeholder text when this bug first arose in  Issue 394714 .

In 10.11, a change was made in this area: https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKitOlderNotes/index.html#10_11SearchField

Mozilla code contains the following remark:

  // When using the 10.11 SDK, the default string will be shown if we don't
  // set the placeholder string.
  [cell setPlaceholderString:@""];

This also still shows if a placeholder is specified in the html.

reproducible in 62.0.3185.0 (Official Build) canary (64-bit)
not reproducible in 60.0.3112.90 (Official Build) (64-bit)

see https://codepen.io/anon/pen/jLGLyb for a reproducible case
Screen Shot 2017-08-14 at 15.26.24.png
7.8 KB View Download
Project Member

Comment 6 by bugdroid1@chromium.org, Aug 18 2017

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

commit 8e11d873e69b78405c93cd4382e5c52338518356
Author: Eric Lawrence <elawrence@chromium.org>
Date: Fri Aug 18 14:56:17 2017

Suppress native placeholder text on MacOS Input Type=Search

The OS X 10.11 SDK introduced a change whereby the "Search" placeholder
text is no longer suppressed by setting setCenteredLook to NO on the
NSSearchFieldCell control. Instead, we now explicitly invoke
|setPlaceholderString| on the control.

Bug:  752362 
Change-Id: I0da791fa3510d682731c5d64971ac669a7608d5a
Reviewed-on: https://chromium-review.googlesource.com/610501
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Eric Lawrence <elawrence@chromium.org>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Reviewed-by: Erik Chen <erikchen@chromium.org>
Commit-Queue: Eric Lawrence <elawrence@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495549}
[modify] https://crrev.com/8e11d873e69b78405c93cd4382e5c52338518356/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm

Labels: TE-Verified-M62 TE-Verified-62.0.3192.0
Tested the issue on Latest Chrome# 62.0.3192.0 and found the issue to be fixed.
Hence adding TE-Verified labels. Adding screenshot for reference.
Thank You.
752362.png
30.8 KB View Download
IF there is no pending work, can we tag as fixed?
Cc: erikc...@chromium.org
Owner: elawrence@chromium.org
Status: Fixed (was: Assigned)

Sign in to add a comment