Keyboard focus event fix