@@ -56,6 +56,13 @@ class ScrollManager extends Base {
5656 */
5757 scrollTimeoutId = null
5858
59+ /**
60+ * Flag for identifying the ownership of a touchmove operation
61+ * @member {'container'|'view'|null} touchMoveOwner=null
62+ * @protected
63+ */
64+ touchMoveOwner = null
65+
5966 /**
6067 * @param {Object } config
6168 */
@@ -96,11 +103,11 @@ class ScrollManager extends Base {
96103 view . scrollPosition = { x : scrollLeft , y : view . scrollPosition . y } ;
97104
98105 if ( touches ) {
99- if ( ! view . isTouchMoveOwner ) {
100- me . isTouchMoveOwner = true
106+ if ( me . touchMoveOwner !== ' view' ) {
107+ me . touchMoveOwner = 'container'
101108 }
102109
103- if ( me . isTouchMoveOwner ) {
110+ if ( me . touchMoveOwner === 'container' ) {
104111 lastTouchY = touches . lastTouch . clientY - touches . firstTouch . clientY ;
105112 deltaY = me . lastTouchY - lastTouchY ;
106113
@@ -120,28 +127,22 @@ class ScrollManager extends Base {
120127 * @param {Object } data
121128 */
122129 onTouchCancel ( data ) {
123- let me = this ,
124- { parent} = me ;
125-
126- me . isTouchMoveOwner = false ;
127- me . lastTouchX = 0 ;
130+ let me = this ;
128131
129- parent . isTouchMoveOwner = false ;
130- parent . lastTouchY = 0
132+ me . touchMoveOwner = null ;
133+ me . lastTouchX = 0 ;
134+ me . lastTouchY = 0
131135 }
132136
133137 /**
134138 * @param {Object } data
135139 */
136140 onTouchEnd ( data ) {
137- let me = this ,
138- { parent} = me ;
139-
140- me . isTouchMoveOwner = false ;
141- me . lastTouchX = 0 ;
141+ let me = this ;
142142
143- parent . isTouchMoveOwner = false ;
144- parent . lastTouchY = 0
143+ me . touchMoveOwner = null ;
144+ me . lastTouchX = 0 ;
145+ me . lastTouchY = 0
145146 }
146147
147148 /**
@@ -166,11 +167,11 @@ class ScrollManager extends Base {
166167 } ) ;
167168
168169 if ( touches ) {
169- if ( ! me . parent . isTouchMoveOwner ) {
170- me . isTouchMoveOwner = true
170+ if ( me . touchMoveOwner !== 'container' ) {
171+ me . touchMoveOwner = 'view'
171172 }
172173
173- if ( me . isTouchMoveOwner ) {
174+ if ( me . touchMoveOwner === 'view' ) {
174175 lastTouchX = touches . lastTouch . clientX - touches . firstTouch . clientX ;
175176 deltaX = me . lastTouchX - lastTouchX ;
176177
0 commit comments