From 5ce602eceae0aa5ac887f89466c427c5ebb8277f Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Fri, 10 Jan 2020 04:09:01 +0100 Subject: [PATCH] FIX: prevents url of file from being pasted when pasting file on iOS (#8693) --- app/assets/javascripts/discourse/components/d-editor.js.es6 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index 7a26db929d4..1c3c18bc571 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -842,7 +842,7 @@ export default Component.extend({ } const isComposer = $("#reply-control .d-editor-input").is(":focus"); - let { clipboard, canPasteHtml } = clipboardData(e, isComposer); + let { clipboard, canPasteHtml, canUpload } = clipboardData(e, isComposer); let plainText = clipboard.getData("text/plain"); let html = clipboard.getData("text/html"); @@ -892,7 +892,7 @@ export default Component.extend({ } } - if (handled) { + if (handled || canUpload) { e.preventDefault(); } },