Fix an issue with losing input focus.