RESOLVED DUPLICATE of bug 24508 24140
REGRESSION: Safari input field value update via Javascript not rendered in UI
https://bugs.webkit.org/show_bug.cgi?id=24140
Summary REGRESSION: Safari input field value update via Javascript not rendered in UI
Ben Gummer
Reported 2009-02-24 14:58:04 PST
Summary: When a text field in Safari 4 has a zero-length value AND has a non zero-length placeholder value, the first attempt to update the value of such a field (using Javascript) is not rendered in the browser UI. Steps to Reproduce: 1. Create an HTML file containing a text field element with a zero-length value, such as <input type="text" value="" placeholder="Placeholder" id="test"> 2. Use Javascript to update the value of the text field element, such as document.getElementById('test').value = "Javascript assigned value"; 3. Notice that when the Javascript is run, the text field element still displays it's placeholder, and not the new value assigned using Javascript. 4. Run the Javascript a second time (without reloading the page). 5. Notice that the expected value is shown upon the second execution of the Javascript. Expected Results: When the Javascript is run for the first time, it is expected that the text field element will display the value assigned via Javascript. Actual Results: When the Javascript is run for the first time, the text field element continues to display it's placeholder value, instead of the new actual value assigned via Javascript. Executing the Javascript a second time causes the value changes to be rendered as expected. Regression: This problem only occurs when a text field element's 'placeholder' attribute is set to a non-zero-length string, AND when the same text field element's 'value' attribute is set to a zero-length string. This problem does not occur in Safari 3. Notes: I have uploaded a demo script to demonstrate the problem (see http://pastie.org/399137.txt)
Attachments
A test script to reproduce the problem (948 bytes, text/html)
2009-02-24 14:58 PST, Ben Gummer
no flags
Ben Gummer
Comment 1 2009-02-24 14:58:52 PST
Created attachment 27938 [details] A test script to reproduce the problem
Alexey Proskuryakov
Comment 2 2009-02-25 08:29:37 PST
Confirmed using a local build of r41181.
Alexey Proskuryakov
Comment 3 2009-03-12 02:40:18 PDT
Alexey Proskuryakov
Comment 4 2009-03-12 10:40:37 PDT
Please cross-reference bugs when filing both here and in Radar. *** This bug has been marked as a duplicate of 24508 ***
Note You need to log in before you can comment on or make changes to this bug.