support check for dirty state during edit and close