Try emitting the event first and then removing the options dialog. That might prevent the problem where the photo is shown again before the delete dialog appears.  You might need to adjust a z index, however.