Allow arrow keys in input fields and textareas

If you pressed an arrow key in a textarea before, the next/previous media
was opened.
This commit is contained in:
Jakob Kramer
2012-03-24 14:49:43 +01:00
parent 32d8cf4511
commit e8be1d7af5
2 changed files with 10 additions and 2 deletions

View File

@@ -16,6 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* It must be wrapped into a function and you also cannot use
* $(':not(textarea, input)') because of some reason. */
$(document).ready(function(){
$('textarea, input').keydown(function(event){
event.stopPropagation();
});
});
$(document).keydown(function(event){
switch(event.which){
case 37:
@@ -30,4 +39,3 @@ $(document).keydown(function(event){
break;
}
});