But it is possible for a text cell to be in command mode but unrendered. The way this is written will mean that the editor won't be focused properly in that case.