Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
d5e25f22
Unverified
Commit
d5e25f22
authored
Mar 31, 2023
by
Justin McCandless
Committed by
GitHub
Mar 31, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TextField in a ListView becomes unresponsive (#123734)
TextField in a ListView becomes unresponsive
parent
daaba8a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
1 deletion
+42
-1
tap_and_drag_gestures.dart
packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart
+3
-1
tap_and_drag_gestures_test.dart
...ages/flutter/test/widgets/tap_and_drag_gestures_test.dart
+39
-0
No files found.
packages/flutter/lib/src/widgets/tap_and_drag_gestures.dart
View file @
d5e25f22
...
...
@@ -1218,7 +1218,9 @@ class TapAndDragGestureRecognizer extends OneSequenceGestureRecognizer with _Tap
keysPressedOnDown:
keysPressedOnDown
,
);
if
(
onDragEnd
!=
null
)
{
invokeCallback
<
void
>(
'onDragEnd'
,
()
=>
onDragEnd
!(
endDetails
));
}
_resetTaps
();
_resetDragUpdateThrottle
();
...
...
packages/flutter/test/widgets/tap_and_drag_gestures_test.dart
View file @
d5e25f22
...
...
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter/foundation.dart'
;
import
'package:flutter/gestures.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
...
...
@@ -549,4 +550,42 @@ void main() {
GestureBinding
.
instance
.
gestureArena
.
sweep
(
2
);
expect
(
events
,
<
String
>[
'down#1'
,
'up#1'
]);
});
// This is a regression test for https://github.com/flutter/flutter/issues/102084.
testGesture
(
'Does not call onDragEnd if not provided'
,
(
GestureTester
tester
)
{
tapAndDrag
=
TapAndDragGestureRecognizer
()
..
dragStartBehavior
=
DragStartBehavior
.
down
..
maxConsecutiveTap
=
3
..
onTapDown
=
(
TapDragDownDetails
details
)
{
events
.
add
(
'down#
${details.consecutiveTapCount}
'
);
};
FlutterErrorDetails
?
errorDetails
;
final
FlutterExceptionHandler
?
oldHandler
=
FlutterError
.
onError
;
FlutterError
.
onError
=
(
FlutterErrorDetails
details
)
{
errorDetails
=
details
;
};
addTearDown
(()
{
FlutterError
.
onError
=
oldHandler
;
});
tapAndDrag
.
addPointer
(
down5
);
tester
.
closeArena
(
5
);
tester
.
route
(
down5
);
tester
.
route
(
move5
);
tester
.
route
(
up5
);
GestureBinding
.
instance
.
gestureArena
.
sweep
(
5
);
expect
(
events
,
<
String
>[
'down#1'
]);
expect
(
errorDetails
,
isNull
);
events
.
clear
();
tester
.
async
.
elapse
(
const
Duration
(
milliseconds:
1000
));
tapAndDrag
.
addPointer
(
down1
);
tester
.
closeArena
(
1
);
tester
.
route
(
down1
);
tester
.
route
(
up1
);
GestureBinding
.
instance
.
gestureArena
.
sweep
(
1
);
expect
(
events
,
<
String
>[
'down#1'
]);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment