Reputation: 468
I found a problem that I am puzzled. It's just a simple , Under normal circumstances,when I click a textarea, the cursor is always at the beginning of the textarea,but today when i type the code like this
<textarea rows="3"></textarea>
on a Chrome extesion web page,the cursor changes it's position with the click position. I swear there's no extra JS or css on the page
Upvotes: 1
Views: 1201
Reputation: 565
There should not be a any space or in tab between <textarea></textarea>
open and close tags.
If got space or tab between tags it will behave strangely.
Upvotes: 2
Reputation: 41
Check in your code if you have tabs in between opening and closing textarea tags. Some IDEs insert tabs upon auto-formatting.
Upvotes: 3
Reputation: 10780
I had the same strange problem. I hacked around it by using the following:
document.getElementById('element-id').innerText = '';
I would love to know the real reason for it occurring.
Upvotes: 0