Prevent race conditions in 'send keys to editor'