File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -516,7 +516,7 @@ module.exports = React.createClass({
516516 handleDragStart : function ( e ) {
517517 // Set touch identifier in component state if this is a touch event
518518 if ( e . targetTouches ) {
519- this . setState ( { identifier : e . targetTouches [ 0 ] . identifier } ) ;
519+ this . setState ( { touchIdentifier : e . targetTouches [ 0 ] . identifier } ) ;
520520 }
521521
522522 // Make it possible to attach event handlers on top of this one
@@ -562,6 +562,11 @@ module.exports = React.createClass({
562562 return ;
563563 }
564564
565+ // Short circuit if this is not the correct touch event
566+ if ( e . changedTouches && ( e . changedTouches [ 0 ] . identifier != this . state . touchIdentifier ) ) {
567+ return ;
568+ }
569+
565570 removeUserSelectStyles ( this ) ;
566571
567572 // Turn off dragging
@@ -580,7 +585,7 @@ module.exports = React.createClass({
580585
581586 handleDrag : function ( e ) {
582587 // Return if this is a touch event, but not the correct one for this element
583- if ( e . targetTouches && ( e . targetTouches [ 0 ] . identifier != this . state . identifier ) ) {
588+ if ( e . targetTouches && ( e . targetTouches [ 0 ] . identifier != this . state . touchIdentifier ) ) {
584589 return ;
585590 }
586591 var dragPoint = getControlPosition ( e ) ;
You can’t perform that action at this time.
0 commit comments