I reported this problem earlier and it seemed to be solved.
It's happening agin with 9.0.2:
When using the shortcut to GoTo Class, the dialog box doesn't always
get the focus. If you start typing the class name right away without
paying attention, IDEA may write what you type in any open file behind
It should be impossible to edit the file behind the dialog while it is open.