Prevent gallery keyboard shortcuts when textarea or input has focus