Make WordPress Core

Changeset 40902


Ignore:
Timestamp:
06/15/2017 09:37:53 AM (9 years ago)
Author:
adamsilverstein
Message:

Media: Disable the edit image->replace button when no item selected.

On the edit media screen, ensure that the 'replace' button is disabled until a media item is selected. Fix an issue where clicking the button with no item selected threw a JavaScript error and failed to work.

Props timmydcrawford, subrataemfluence, psiico.
Fixes #40589.

Location:
trunk/src/wp-includes/js
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/media-views.js

    r40874 r40902  
    51175117                                        text:     l10n.replace,
    51185118                                        priority: 80,
     5119                                        requires: { selection: true },
    51195120
    51205121                                        click: function() {
  • trunk/src/wp-includes/js/media/views/frame/image-details.js

    r33337 r40902  
    147147                                        text:     l10n.replace,
    148148                                        priority: 80,
     149                                        requires: { selection: true },
    149150
    150151                                        click: function() {
Note: See TracChangeset for help on using the changeset viewer.