Make WordPress Core

Changeset 21785


Ignore:
Timestamp:
09/07/2012 10:09:40 PM (13 years ago)
Author:
koopersmith
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r21784 r21785  
    16501650        <div class="attachment-thumbnail type-<%- type %> subtype-<%- subtype %> <%- orientation %>">
    16511651            <% if ( thumbnail ) { %>
    1652                 <img src="<%- thumbnail %>" />
     1652                <img src="<%- thumbnail %>" draggable="false" />
    16531653            <% } %>
    16541654
     
    16641664        <div class="selected-img selected-count-<%- count %>">
    16651665            <% if ( thumbnail ) { %>
    1666                 <img src="<%- thumbnail %>" />
     1666                <img src="<%- thumbnail %>" draggable="false" />
    16671667            <% } %>
    16681668
Note: See TracChangeset for help on using the changeset viewer.