A minimal code that reproduces the problem is as follows:
<div class="cell">
<input type="text" size=1>
<textarea style="display:none;"></textarea>
</div>
<script type="text/javascript">
$('.cell input').focusin(function() {
$(this).hide();
$('.cell textarea').show().focus();
});
</script>
When the input element is clicked, it should be hidden and the textarea should be shown and focused. This works fine, but only in IE (even IE9) the textarea behaves like readonly, though it is focusable and the readonly attribute is not set. When the textarea is clicked again, it becomes editable.
Also I tried select()
instead of focus()
, as suggested in IE readonly textarea problem but no difference in the result.
What am I missing?