I am using something like this:
jQuery(document).keydown(function(e){
To switch photos into a photo album with arrows .. This works great, but! I want to disable in textarea. Because if I comment on a photo and I want to move the cursor with arrows, I switch the photo and lose text :)
How to disable it? Can I catch which element is focused? Thanks you
source share