1

I have the following HTML:

<div id="blocked-layer-parent">
    <textarea id="paint-textarea" placeholder="Enter text" autofocus><%-sometext%></textarea>
    <div id="blocked-layer"></div>
</div>

In IE 11 autofocus doesn't work. I tried to use focus function like this:

$("#paint-textarea").focus();

or this:

var textAreaElement = document.getElementById("paint-textarea");
setTimeout(function() {
    textAreaElement.focus();
}, 2100);

but textarea doesn't get focus in IE 11. I looked different decisions (for example jQuery focus() sometimes not working in IE8 and focus doesn't work in IE) but noone doesn't work.

Thanks for any help.

P.S. textarea's placeholder is transforming in text (textelement) in IE. I find it so strange. In other module of application I have input with placeholder for searching. This placeholder works like placeholder (it disappears after char inputing). After some dialog showing placeholder transforms in text and searching stops working. Maybe the problem is related to this?

Community
  • 1
  • 1

1 Answers1

0

I tried pure html and js on jsFiddle, and it works. Maybe css cause the problem.

wybeen
  • 1
  • 2