-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17Found to occur in 3.17has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- Use the provided repro code
- Tap on the text field to give it focus
- Tap outside the text field to trigger the
onTapOutsidecallback
Expected results
The onTapOutside is called twice - once for a down event, and once for an up event.
Actual results
The onTapOutside is only called once, for a "down" event.
Code sample
Code sample
import 'package:flutter/material.dart';
const Color darkBlue = Color.fromARGB(255, 18, 32, 47);
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData.dark().copyWith(
scaffoldBackgroundColor: darkBlue,
),
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Center(
child: MyWidget(),
),
),
);
}
}
class MyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Center(
child: SizedBox(
width: 350,
child: TextField(
onTapOutside: (event) {
print("Tap outside event - is down? ${event.down}");
}
),
),
);
}
}
Screenshots or Video
NA
Logs
Logs
Tap outside event - is down? trueFlutter Doctor output
This reproduction works on DartPad.dev, but I've also reproduced locally in an iOS simulator:
Version output
Flutter 3.16.0-12.0.pre.41 • channel master • https://github.com/flutter/flutter.git
Framework • revision 4b72a6e831 (4 weeks ago) • 2023-10-14 01:01:03 -0400
Engine • revision 472be42e90
Tools • Dart 3.3.0 (build 3.3.0-26.0.dev) • DevTools 2.28.1MatrixDev, harkairt and Hannnes1
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: text inputEntering text in a text field or keyboard related problemsEntering text in a text field or keyboard related problemsf: gesturesflutter/packages/flutter/gestures repository.flutter/packages/flutter/gestures repository.f: material designflutter/packages/flutter/material repository.flutter/packages/flutter/material repository.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17Found to occur in 3.17has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-designOwned by Design Languages teamOwned by Design Languages teamtriaged-designTriaged by Design Languages teamTriaged by Design Languages team