[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selection toolbar not showing on drag end #121110

Merged
merged 3 commits into from
Mar 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove unnecessary pumps with duration
  • Loading branch information
jankuss committed Mar 23, 2023
commit 5a4c945e679cff92b4dad219adc80f30f3405d71
7 changes: 2 additions & 5 deletions packages/flutter/test/material/selection_area_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ void main() {
addTearDown(gesture.removePointer);
await tester.pump(const Duration(milliseconds: 500));
await gesture.up();
await tester.pump(const Duration(milliseconds: 500));
final List<TextBox> boxes = paragraph2.getBoxesForSelection(paragraph2.selections[0]);
expect(boxes.length, 1);
// There is a selection now.
Expand All @@ -168,12 +167,10 @@ void main() {
final Offset handlePos = paragraph2.localToGlobal(boxes[0].toRect().bottomRight);
await gesture.down(handlePos);
await gesture.moveTo(textOffsetToPosition(paragraph2, 11) + Offset(0, paragraph2.size.height / 2));
await tester.pump(const Duration(milliseconds: 500));
await tester.pump(const Duration(milliseconds: 500));
await tester.pump();

await gesture.up();
await tester.pump(const Duration(milliseconds: 500));
await tester.pump(const Duration(milliseconds: 500));
await tester.pump();

// After lifting the finger up, the selection toolbar should be showing again.
expect(find.text('Copy'), findsOneWidget);
Expand Down