adding OnMayClose check for editor tabs