Merge pull request #9794 from Filoppi/fix_input_focus_bug Fix input focus checks being wrong (issue 12540)