<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Setting value of generated <input> programatically does not remove the placeholder text"
href="https://bugs.webkit.org/show_bug.cgi?id=166690">166690</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Setting value of generated <input> programatically does not remove the placeholder text
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Safari 10
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>OS X 10.11
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Forms
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>scott@basecamp.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=298037" name="attach_298037" title="Test Case + Fix">attachment 298037</a> <a href="attachment.cgi?id=298037&action=edit" title="Test Case + Fix">[details]</a></span>
Test Case + Fix
Setting input.value on an <input> field does not reliably redraw if it has placeholder text when that <input> has been generated programatically. This leads to situations where the input.value is displayed *on top of* the placeholder text.
Steps to reproduce:
1) Generate a new <input> via javascript
2) Assign this <input> a placeholder attribute
3) Append <input> to the document.body
4) Set the value of the <input> (w/timeout as this won't happen immediately)
5) Notice that the input.value is displayed on top of the placeholder
The workaround is to toggle input.readOnly on/off again while setting input.value (see attached).</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>