Reset key focus when the key focus widget is hidden (Fixes #1568)