diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js --- a/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-includes/js/imgareaselect/jquery.imgareaselect.js Wed Sep 21 18:19:35 2022 +0200 @@ -1,6 +1,6 @@ /* * imgAreaSelect jQuery plugin - * version 0.9.10-monkey + * version 0.9.10-wp * * Copyright (c) 2008-2013 Michal Wojciechowski (odyniec.net) * @@ -388,7 +388,7 @@ * current handler */ if ($.imgAreaSelect.onKeyPress != docKeyPress) - $(document).unbind($.imgAreaSelect.keyPress, + $(document).off($.imgAreaSelect.keyPress, $.imgAreaSelect.onKeyPress); if (options.keys) @@ -396,8 +396,9 @@ * Set the document keypress event handler to this instance's * docKeyPress() function */ - $(document)[$.imgAreaSelect.keyPress]( - $.imgAreaSelect.onKeyPress = docKeyPress); + $(document).on( $.imgAreaSelect.keyPress, function() { + $.imgAreaSelect.onKeyPress = docKeyPress; + }); } /* @@ -931,7 +932,7 @@ * The font-size property needs to be set to zero, otherwise * Internet Explorer makes the handles too large */ - fontSize: 0, + fontSize: '0', zIndex: zIndex + 1 || 1 }); @@ -1010,7 +1011,7 @@ /* Calculate the aspect ratio factor */ aspectRatio = (d = (options.aspectRatio || '').split(/:/))[0] / d[1]; - $img.add($outer).unbind('mousedown', imgMouseDown); + $img.add($outer).off('mousedown', imgMouseDown); if (options.disable || options.enable === false) { /* Disable the plugin */ @@ -1025,7 +1026,7 @@ $box.on({ 'mousemove touchmove': areaMouseMove, 'mousedown touchstart': areaMouseDown }); - $(window).resize(windowResize); + $(window).on( 'resize', windowResize); } if (!options.persistent) @@ -1162,7 +1163,7 @@ $box.add($outer).css({ visibility: 'hidden', position: position, overflow: 'hidden', zIndex: zIndex || '0' }); $box.css({ zIndex: zIndex + 2 || 2 }); - $area.add($border).css({ position: 'absolute', fontSize: 0 }); + $area.add($border).css({ position: 'absolute', fontSize: '0' }); /* * If the image has been fully loaded, or if it is not really an image (eg.