From 349f8e098f51b4823959a72fa721aa1fa8f2a9c6 Mon Sep 17 00:00:00 2001 From: evazion Date: Fri, 7 Jan 2022 21:33:26 -0600 Subject: [PATCH] posts: prevent dragging of thumbnails. Disable the ability to click and drag thumbnails. This usually happened by accident when you clicked on a thumbnail and accidentally dragged it, especially during tag scripting. --- .../post_preview_component/post_preview_component.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/post_preview_component/post_preview_component.html.erb b/app/components/post_preview_component/post_preview_component.html.erb index 9909169b9..1333c8368 100644 --- a/app/components/post_preview_component/post_preview_component.html.erb +++ b/app/components/post_preview_component/post_preview_component.html.erb @@ -1,6 +1,6 @@ <%= tag.article id: "post_#{post.id}", **article_attrs do -%>
- <%= link_to polymorphic_path(link_target, q: tags), class: "post-preview-link" do -%> + <%= link_to polymorphic_path(link_target, q: tags), class: "post-preview-link", draggable: "false" do -%> <% if is_animated? || has_sound? %>
<% if is_animated? %> @@ -24,7 +24,7 @@ <% end %> <% end %> - <%= tag.img src: variant.file_url, width: variant.width, height: variant.height, class: "post-preview-image", title: tooltip, alt: "post ##{post.id}", crossorigin: "anonymous" -%> + <%= tag.img src: variant.file_url, width: variant.width, height: variant.height, class: "post-preview-image", title: tooltip, alt: "post ##{post.id}", crossorigin: "anonymous", draggable: "false" -%> <% end -%>