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. git-svn-id: https://develop.svn.wordpress.org/trunk@42818 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
fd1681f0cf
commit
1b043c1492
@ -653,7 +653,7 @@
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
parent.children().mousedown(function(e){
|
||||
parent.children().on( 'mousedown, touchstart', function(e){
|
||||
var ratio = false, sel, defRatio;
|
||||
|
||||
if ( e.shiftKey ) {
|
||||
|
@ -748,7 +748,7 @@ $.imgAreaSelect = function (img, options) {
|
||||
*/
|
||||
function imgMouseDown(event) {
|
||||
/* 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();
|
||||
startX = x1 = evX(event);
|
||||
|
Loading…
x
Reference in New Issue
Block a user