Bug 41387 - <input> placeholder text does not redraw if its disabled state changes and it has a background image
Summary: <input> placeholder text does not redraw if its disabled state changes and it...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-29 19:26 PDT by Joseph Pecoraro
Modified: 2013-06-03 15:16 PDT (History)
3 users (show)

See Also:


Attachments
[TEST] Reduction Showing the Problem (490 bytes, text/html)
2010-06-29 19:26 PDT, Joseph Pecoraro
no flags Details
[IMAGE] Expected Results After 1 Second (53.32 KB, image/png)
2010-06-29 19:27 PDT, Joseph Pecoraro
no flags Details
[IMAGE] Actual Results After 1 Second (53.25 KB, image/png)
2010-06-29 19:27 PDT, Joseph Pecoraro
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.