Fixed by forcing the blur handler to be called immediately when setting the content as not dirty if the editor has focus, but there is a blur timer started.