It seems the only way to stop renaming a file is either pressing enter, or escape... What about mouse-click?
Maybe because I'm a windows user, but I expected the textbox to lose focus when clicking on code I wanted to edit in the IJ... though this should apply to mouse-clicks to anywhere else too, imo.