Merge "Reset IME visible types only when losing control" into main