Fixing focus bug with editor