[Webkit-unassigned] [Bug 166690] New: Setting value of generated <input> programatically does not remove the placeholder text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 4 12:15:08 PST 2017


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

            Bug ID: 166690
           Summary: Setting value of generated <input> programatically
                    does not remove the placeholder text
    Classification: Unclassified
           Product: WebKit
           Version: Safari 10
          Hardware: Unspecified
                OS: OS X 10.11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Forms
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: scott at basecamp.com

Created attachment 298037
  --> https://bugs.webkit.org/attachment.cgi?id=298037&action=review
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).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170104/90537c9a/attachment.html>


More information about the webkit-unassigned mailing list