Prevent img elements in the media modal from being draggable. see #21390.

Browsers natively support dragging img elements, which would then set off the drop zone in the modal. We disable this by setting the draggable attribute to false.



git-svn-id: https://develop.svn.wordpress.org/trunk@21785 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith 2012-09-07 22:09:40 +00:00
parent c7eca8e2d5
commit 7955b982b3
1 changed files with 2 additions and 2 deletions

View File

@ -1649,7 +1649,7 @@ function wp_print_media_templates( $attachment ) {
<script type="text/html" id="tmpl-attachment">
<div class="attachment-thumbnail type-<%- type %> subtype-<%- subtype %> <%- orientation %>">
<% if ( thumbnail ) { %>
<img src="<%- thumbnail %>" />
<img src="<%- thumbnail %>" draggable="false" />
<% } %>
<% if ( uploading ) { %>
@ -1663,7 +1663,7 @@ function wp_print_media_templates( $attachment ) {
<script type="text/html" id="tmpl-media-selection-preview">
<div class="selected-img selected-count-<%- count %>">
<% if ( thumbnail ) { %>
<img src="<%- thumbnail %>" />
<img src="<%- thumbnail %>" draggable="false" />
<% } %>
<span class="count"><%- count %></span>