Prevent losing focus of the editor (Fixes #1)