Media: Fix image cropping on touch screen devices.
* In initCrop, handle touch events in addition to mouse events. * In imageSelect jQuery plugin, accept event.which of 0 as provided by touch events. Props yahil, alexgso, joemcgill. Fixes #41242. Built from https://develop.svn.wordpress.org/trunk@42818 git-svn-id: http://core.svn.wordpress.org/trunk@42648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6751be3561
commit
e70caa19a1
|
@ -653,7 +653,7 @@
|
||||||
*
|
*
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
parent.children().mousedown(function(e){
|
parent.children().on( 'mousedown, touchstart', function(e){
|
||||||
var ratio = false, sel, defRatio;
|
var ratio = false, sel, defRatio;
|
||||||
|
|
||||||
if ( e.shiftKey ) {
|
if ( e.shiftKey ) {
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -748,7 +748,7 @@ $.imgAreaSelect = function (img, options) {
|
||||||
*/
|
*/
|
||||||
function imgMouseDown(event) {
|
function imgMouseDown(event) {
|
||||||
/* Ignore the event if animation is in progress */
|
/* Ignore the event if animation is in progress */
|
||||||
if (event.which != 1 || $outer.is(':animated')) return false;
|
if (event.which > 1 || $outer.is(':animated')) return false;
|
||||||
|
|
||||||
adjust();
|
adjust();
|
||||||
startX = x1 = evX(event);
|
startX = x1 = evX(event);
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.0-alpha-42817';
|
$wp_version = '5.0-alpha-42818';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue