Bug 41387

Summary: <input> placeholder text does not redraw if its disabled state changes and it has a background image
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bertrand.design, joepeck, robert
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
Attachments:
Description Flags
[TEST] Reduction Showing the Problem
none
[IMAGE] Expected Results After 1 Second
none
[IMAGE] Actual Results After 1 Second none

Description Joseph Pecoraro 2010-06-29 19:26:31 PDT
Created attachment 60079 [details]
[TEST] Reduction Showing the Problem

Attached a reduction. In HTML the input element is disabled. JavaScript later
enables the input element. When this change happens the <input> is redrawn
(the border and background change) but the placeholder text stays dark, from
the disabled state instead of light like the enabled state. Add a setTimeout to
the reduction to see the disabled -> enabled transition and how it doesn't
change the color of the text.
Comment 1 Joseph Pecoraro 2010-06-29 19:27:15 PDT
Created attachment 60080 [details]
[IMAGE] Expected Results After 1 Second
Comment 2 Joseph Pecoraro 2010-06-29 19:27:59 PDT
Created attachment 60081 [details]
[IMAGE] Actual Results After 1 Second
Comment 3 Joseph Pecoraro 2010-06-29 19:28:45 PDT
When the <input> is in the bad state, focusing it and then
unfocusing it causes it to redraw the placeholder text correctly.
Comment 4 Benjamin Bertrand 2011-03-21 13:13:44 PDT
This also happens when both attributes "value" and "placeholder" are added to the INPUT tag, and the value is removed with javascript [input.removeAttrute("value")]. 
The value is removed as expected, but the input remains blank. 
The placeholder text is not updated or rendered until the input is blurred.
Comment 5 Robert Hogan 2013-06-01 02:23:01 PDT
I can't reproduce this. Is it still an issue?
Comment 6 Joseph Pecoraro 2013-06-03 15:16:32 PDT
You're right, this looks correct now. Closing, thanks.