[Webkit-unassigned] [Bug 24140] New: Safari input field value update via Javascript not rendered in UI

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 24 14:58:04 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=24140

           Summary: Safari input field value update via Javascript not
                    rendered in UI
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bengummer at gmail.com


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)


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list