WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WORKSFORME
166690
Setting value of generated <input> programatically does not remove the placeholder text
https://bugs.webkit.org/show_bug.cgi?id=166690
Summary
Setting value of generated <input> programatically does not remove the placeh...
scott
Reported
2017-01-04 12:15:08 PST
Created
attachment 298037
[details]
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).
Attachments
Test Case + Fix
(1.17 KB, text/html)
2017-01-04 12:15 PST
,
scott
no flags
Details
GIF of Issue
(12.58 KB, image/gif)
2017-01-04 12:16 PST
,
scott
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
scott
Comment 1
2017-01-04 12:16:50 PST
Created
attachment 298038
[details]
GIF of Issue
scott
Comment 2
2017-01-04 12:19:09 PST
Note: This issue is most easily reproduced when the web inspector is open.
Jayden Irwin
Comment 3
2017-05-09 17:19:51 PDT
This issue occurs with <input>s not created by javascript too. I'm on Safari TP 29.
Ahmad Saleem
Comment 4
2023-06-28 17:58:55 PDT
I am not able to reproduce this in WebKit ToT using attached test case.
Karl Dubost
Comment 5
2023-06-28 18:06:23 PDT
This report was done for Safari 10. and it is not happening for me in Safari 17. It has been probably fixed along the way, but I don't know when. Closing as WORKSFORME
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug