         let alertController = UIAlertController(title: title, message:message, preferredStyle: .actionSheet)
         let dismissAction = UIAlertAction(title: NSLocalizedString("Dismiss", comment: "User action to dismiss media options."),
                                           style: .cancel,
-                                          handler: nil
+                                          handler: { (action) in
+                                            self.resetMediaAttachmentOverlay(attachment)
+                                            self.richTextView.refresh(attachment)
+        }
         )
         alertController.addAction(dismissAction)
 

        deselected(textAttachment: attachment, atPosition: position)
    }

    func selected(textAttachment attachment: MediaAttachment, atPosition position: CGPoint) {
        if (currentSelectedAttachment == attachment) {
            displayActions(forAttachment: attachment, position: position)
        } else {
            if let selectedAttachment = currentSelectedAttachment {
                selectedAttachment.message = nil
                if selectedAttachment is ImageAttachment {
                    selectedAttachment.overlayImage = nil
                }
                richTextView.refresh(selectedAttachment)
            }


    func deselected(textAttachment attachment: NSTextAttachment, atPosition position: CGPoint) {
        currentSelectedAttachment = nil
        if let mediaAttachment = attachment as? MediaAttachment {
            self.resetMediaAttachmentOverlay(mediaAttachment)
            richTextView.refresh(mediaAttachment)
        }
    }
