Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Arrow keys not working in input and textarea

I have a simple textarea and input in my webapplication. For some reason, I cannot go back in the typed text with the arrow keys. The input cursor does not move backwards.

I can however use ctrl+a, or click the with the mouse on the position that I want to edit. This is confusing. I am not using e.preventDefault in any key event in my code - having around 30 js files and some huge css files -.

Any ideas on why the arrows might not work?

Thanks!

like image 965
Vlad Nicula Avatar asked Feb 17 '12 09:02

Vlad Nicula


1 Answers

Do a search in all your JS files and look for something similar to:

keyCode == 37

or

which == 37

as this is the left-arrow. Probably somewhere there is something similar to:

if (e.keyCode == 37)
   e.preventDefault();
like image 169
Jules Avatar answered Oct 20 '22 14:10

Jules