The placeholder attribute does not work when the input element gets the focus under IE11.

problem description

the placeholder attribute does not work when the input element gets focus under IE11

abnormal effect of IE11 :
clipboard.png

:
clipboard.png

related codes

 <input class="prompt" type="text" placeholder="">

js code is used to get focus:

search_input.focus()

what result do you expect? What is the error message actually seen?

how can I solve this problem so that the content of the placeholder property setting can be displayed correctly in the ie11 browser?

Nov.06,2021

ie11 is like this. Why do you have to ask ie11 developers that if you want this effect, you have to simulate it with js,css

?
Menu