I am using something like this:
jQuery(document).keydown(function(e){
// code
}
For switching photos in photoalbum with arrow keys.. It works great, but!
I want to disable in textarea. Because, if I am commenting a photo and I want to move cursor with arrow keys, I switch photo and lose my text 🙂
How to disable it? Can I catch, which element is focused?
Thank you
You can check to see if the target element is a textarea.