-
-
Save javan/2af8bde4930b2d2446f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/trix/models/composition.coffee b/src/trix/models/composition.coffee | |
index 0de874b..ce3517d 100644 | |
--- a/src/trix/models/composition.coffee | |
+++ b/src/trix/models/composition.coffee | |
@@ -103,12 +103,15 @@ class Trix.Composition | |
insertFile: (file) -> | |
if @delegate?.compositionShouldAcceptFile(file) | |
attachment = Trix.Attachment.attachmentForFile(file) | |
text = Trix.Text.textForAttachmentWithAttributes(attachment, @currentAttributes) | |
@insertText(text) | |
+ Trix.Helpers.defer => | |
+ @delegate.documentElement.blur() | |
+ @delegate.documentElement.focus() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment