mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-26 02:57:45 +01:00
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. Merges [42818] to the 4.9 branch. Fixes #41242. Built from https://develop.svn.wordpress.org/branches/4.9@42874 git-svn-id: http://core.svn.wordpress.org/branches/4.9@42704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
61be857c95
commit
4650753c6b
@ -627,7 +627,7 @@
|
||||
*
|
||||
* @returns {void}
|
||||
*/
|
||||
parent.children().mousedown(function(e){
|
||||
parent.children().on( 'mousedown, touchstart', function(e){
|
||||
var ratio = false, sel, defRatio;
|
||||
|
||||
if ( e.shiftKey ) {
|
||||
|
2
wp-admin/js/image-edit.min.js
vendored
2
wp-admin/js/image-edit.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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);
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9.5-beta1-42869';
|
||||
$wp_version = '4.9.5-beta1-42874';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user