File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/flutter/lib/src/gestures Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -241,13 +241,16 @@ class TapAndDragGestureRecognizer extends OneSequenceGestureRecognizer with _Con
241
241
void acceptGesture (int pointer) {
242
242
assert (! _acceptedActivePointers.contains (pointer));
243
243
if (pointer == _primaryPointer) {
244
+ _stopDeadlineTimer ();
244
245
print ('is primary pointer' );
245
246
// _checkTapDown(event);
246
247
if (_down != null ) {
247
248
_checkTapDown (_down! );
248
249
// _checkTapUp(_up!);
249
250
}
250
- _stopDeadlineTimer ();
251
+ if (_up != null ) {
252
+ _checkTapUp (_up! );
253
+ }
251
254
}
252
255
_acceptedActivePointers.add (pointer);
253
256
print ('accept gesture $pointer ' );
@@ -256,6 +259,7 @@ class TapAndDragGestureRecognizer extends OneSequenceGestureRecognizer with _Con
256
259
@override
257
260
void didStopTrackingLastPointer (int pointer) {
258
261
print ('didStopTrackingLastPointer $_state $pointer ' );
262
+ _stopDeadlineTimer ();
259
263
switch (_state) {
260
264
case _DragState .ready:
261
265
resolve (GestureDisposition .rejected);
@@ -277,7 +281,6 @@ class TapAndDragGestureRecognizer extends OneSequenceGestureRecognizer with _Con
277
281
_checkEnd ();
278
282
break ;
279
283
}
280
- _stopDeadlineTimer ();
281
284
_up = null ;
282
285
_down = null ;
283
286
_initialButtons = null ;
@@ -351,6 +354,9 @@ class TapAndDragGestureRecognizer extends OneSequenceGestureRecognizer with _Con
351
354
void rejectGesture (int pointer) {
352
355
print ('reject gesture $pointer ' );
353
356
print ('cancel from reject' );
357
+ if (pointer == _primaryPointer) {
358
+ _stopDeadlineTimer ();
359
+ }
354
360
_giveUpPointer (pointer);
355
361
}
356
362
You can’t perform that action at this time.
0 commit comments