Bug 138682 - REGRESSION (r172826) Password field placeholder text is missing
Summary: REGRESSION (r172826) Password field placeholder text is missing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jon Honeycutt
URL: data:text/html,<input placeholder="Pa...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-11-12 19:34 PST by Jon Honeycutt
Modified: 2014-11-13 12:15 PST (History)
2 users (show)

See Also:


Attachments
Patch (5.30 KB, patch)
2014-11-12 20:23 PST, Jon Honeycutt
benjamin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Honeycutt 2014-11-12 19:34:02 PST
Pasword field placeholder text is missing if the placeholder attribute precedes the type attribute.

To repro, navigate to data:text/html,<input placeholder="Password" type="password">


<rdar://problem/18574213>
Comment 1 Jon Honeycutt 2014-11-12 20:23:14 PST
Created attachment 241463 [details]
Patch
Comment 2 Benjamin Poulain 2014-11-12 20:37:19 PST
Comment on attachment 241463 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241463&action=review

Thanks a lot for fixing this!

> LayoutTests/ChangeLog:12
> +        * fast/forms/placeholder-attribute-ordering-expected.html: Added.
> +        * fast/forms/placeholder-attribute-ordering.html: Added.

Can you please add a test were attributes are added dynamically from JS?

Dynamic style updates tend to have their own set of bugs.

> LayoutTests/fast/forms/placeholder-attribute-ordering.html:5
> +        ::-webkit-input-placeholder { color: green; }

Do you really need to color the placeholder for testing?

Using the pseudo element ::-webkit-input-placeholder is a bit annoying because its scope is not yet well defined.
Comment 3 Jon Honeycutt 2014-11-13 02:12:54 PST
(In reply to comment #2)
> Comment on attachment 241463 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241463&action=review
> 
> Thanks a lot for fixing this!
> 
> > LayoutTests/ChangeLog:12
> > +        * fast/forms/placeholder-attribute-ordering-expected.html: Added.
> > +        * fast/forms/placeholder-attribute-ordering.html: Added.
> 
> Can you please add a test were attributes are added dynamically from JS?

Yes, I'll add some tests for this.

> 
> Dynamic style updates tend to have their own set of bugs.
> 
> > LayoutTests/fast/forms/placeholder-attribute-ordering.html:5
> > +        ::-webkit-input-placeholder { color: green; }
> 
> Do you really need to color the placeholder for testing?
> 
> Using the pseudo element ::-webkit-input-placeholder is a bit annoying
> because its scope is not yet well defined.

I wanted to use the 'placeholder' attribute for the test and the 'value' attribute to display the same text for the reference file, so I styled them to look the same. I'll change them to both use the 'placeholder' attribute, though.

Thanks for the review!
Comment 4 Jon Honeycutt 2014-11-13 12:15:30 PST
Committed r176082: <http://trac.webkit.org/changeset/176082>