From 847b1dbd11b84df90509f8d7f6136836ae55e321 Mon Sep 17 00:00:00 2001 From: Matt Slack Date: Thu, 18 May 2023 09:46:53 -0400 Subject: [PATCH] Make attachment wrappers draggable, but img elements not draggable --- src/trix/views/attachment_view.js | 1 + src/trix/views/previewable_attachment_view.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/trix/views/attachment_view.js b/src/trix/views/attachment_view.js index 231e25360..39a8e1496 100644 --- a/src/trix/views/attachment_view.js +++ b/src/trix/views/attachment_view.js @@ -24,6 +24,7 @@ export default class AttachmentView extends ObjectView { className: this.getClassName(), data: this.getData(), editable: false, + draggable: true, }) const href = this.getHref() diff --git a/src/trix/views/previewable_attachment_view.js b/src/trix/views/previewable_attachment_view.js index e6585277b..e87c17dcc 100644 --- a/src/trix/views/previewable_attachment_view.js +++ b/src/trix/views/previewable_attachment_view.js @@ -18,6 +18,7 @@ export default class PreviewableAttachmentView extends AttachmentView { data: { trixMutable: true, }, + draggable: false, }) this.refresh(this.image)