Reputation: 163
I wanted to prevent access to my textarea and for that, I insert the "disabled" attribute in my textarea but when I select the text inside it to remove my naviguator return to the page previous ...
Try it yourself : http://jsfiddle.net/Uqrnm/1/
<textarea disabled> MyTextarea </textarea>
Thank's
Upvotes: 1
Views: 32
Reputation: 78671
The Backspace key you are trying to use is a hotkey for Back in most browsers.
Since your element is disabled
, it does not receive focus, so pressing Backspace key will trigger the Back functionality of the browser tab (at least in IE and Chrome, but Firefox does not even let me select the text).
So there is no WTF, this is quite normal behaviour.
Upvotes: 3