Make WordPress Core

Changeset 40431


Ignore:
Timestamp:
04/14/2017 04:42:16 PM (8 years ago)
Author:
adamsilverstein
Message:

Upload: improve legacy SWFUpload event handlers for current jQuery.

Fix an issue where legacy JavaScript for SWFUpload still used jQuery's
deprecated live event which no longer works - switch to using on.
This JavaScript is still used by some plugins and themes.

Props MMDeveloper.
Fixes #39886.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/js/swfupload/handlers.js

    r27243 r40431  
    357357// remember the last used image size, alignment and url
    358358jQuery(document).ready(function($){
    359     $('input[type="radio"]', '#media-items').live('click', function(){
     359    $( 'input[type="radio"]', '#media-items' ).on( 'click', function(){
    360360        var tr = $(this).closest('tr');
    361361
     
    366366    });
    367367
    368     $('button.button', '#media-items').live('click', function(){
     368    $( 'button.button', '#media-items' ).on( 'click', function(){
    369369        var c = this.className || '';
    370370        c = c.match(/url([^ '"]+)/);
Note: See TracChangeset for help on using the changeset viewer.