improvements to editor's event handling