Prevent gallery keyboard shortcuts when textarea or input has focus

When you are in a gallery popup with Inline or AJAX content, trying to press left or right on the keyboard while typing in an input or textarea will trigger the gallery next/right functions. This prevents that.