Bug 12190

Summary: REGRESSION: Placeholder text does not reflect dynamic updates
Product: WebKit Reporter: Matt Lilek <dev+webkit>
Component: FormsAssignee: Darin Adler <darin>
Severity: Normal CC: mitz
Priority: P1 Keywords: HasReduction, Regression
Version: 420+   
Hardware: Macintosh   
OS: OS X 10.4   
URL: http://www.apple.com/itunes/ads/
Description Flags
patch with change log aroben: review+

Description Matt Lilek 2007-01-09 22:18:48 PST
If you set a form element's placeholder text via javascript, the update does not take effect on ToT until after it's focused while shipping Safari updates it immediately as expected.
Comment 1 Matt Lilek 2007-01-09 22:20:31 PST
Created attachment 12340 [details]
Comment 2 Darin Adler 2007-01-11 07:38:46 PST
I have a fix.
Comment 3 Darin Adler 2007-01-11 08:54:00 PST
Created attachment 12363 [details]
patch with change log
Comment 4 Adam Roben (:aroben) 2007-01-11 09:45:53 PST
Comment on attachment 12363 [details]
patch with change log

+        if (!wasDirty)
+            document()->frame()->textFieldDidBeginEditing(input);
+        document()->frame()->textDidChangeInTextField(input);

   Do you need to null-check document() and/or frame() here?

Comment 5 Darin Adler 2007-01-15 20:11:09 PST
(In reply to comment #4)
>    Do you need to null-check document() and/or frame() here?

No on document(), yes on frame().
Comment 6 Darin Adler 2007-01-15 21:01:32 PST
Committed revision 18877.