This is because your element is never editable. As simple as that.
You need to know two things here:
http://www.w3schools.com/jsref/prop_html_iscontenteditable.asp[
^],
http://www.w3schools.com/jsref/prop_html_contenteditable.asp[
^].
Now, some background:
This property has nothing to do with "normal" input control. It is related to the attribute
contentEditable
which allows you to edit formatted content of something like
div
or
p
.
Compare behavior of the div and input control on this example:
<html>
<head>
<title>Example</title>
</head>
<body>
<input type="text" id="text"/>
<div contentEditable="true" id="div">some content</div>
<script>
text = document.getElementById("text");
div = document.getElementById("div");
alert("Editable: text: "
+ text.isContentEditable + "; div: "
+ div.isContentEditable);
</script>
</body>
</html>
First, you will see that you are able to edit the element with the text "some content", even though this is the regular markup. This is how HTML editors are created. You will see that only this element is considered editable.
—SA