Close virtual keyboard when leaving activity and resource configuration dialogs. It is very difficult to reproduce the problem in the activity switcher filter's input field. I did it twice in dozens of tries, but I do not know how the problem happens there.
CCBUG: 288828
(cherry picked from commit cc4f67369bba78ca0476397ee846fe90e46c73f5)