Skip to content

Commit 124dc79

Browse files
author
Renzo Olivares
committed
fix Can select text by dragging with a mouse due to dragStart only being fired on the first PointerMoveEvent, the previous pan gesture recognizer would fire both dragStart and dragUpdate
1 parent 20d1c48 commit 124dc79

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/flutter/test/material/text_field_test.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,10 +1980,13 @@ void main() {
19801980
await skipPastScrollingAnimation(tester);
19811981

19821982
final Offset ePos = textOffsetToPosition(tester, testValue.indexOf('e'));
1983+
final Offset fPos = textOffsetToPosition(tester, testValue.indexOf('f'));
19831984
final Offset gPos = textOffsetToPosition(tester, testValue.indexOf('g'));
19841985

19851986
final TestGesture gesture = await tester.startGesture(ePos, kind: PointerDeviceKind.mouse);
19861987
await tester.pump();
1988+
await gesture.moveTo(fPos);
1989+
await tester.pump();
19871990
await gesture.moveTo(gPos);
19881991
await tester.pump();
19891992
await gesture.up();

0 commit comments

Comments
 (0)