-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
a: 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.10Found to occur in 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11Found to occur in 3.11frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specifically
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
- Create
TextFormFieldwidget; - field
enableInteractiveSelectionset totrue; - set field onTapOutside:
onTapOutside: (event) => FocusManager.instance.primaryFocus?.unfocus(); - tap on
TextFormFieldto get focused on it; - tap outside of
TextFormFieldnear of left bottom corner (about 10px from corner).
Expected results
When tap outside of TextFormField widget becomes unfocused.
Actual results
TextFormField becomes unfocused, but sometimes magnification appears and doesn't disappear.
At video demonstration you can see, that I got this effect only at second attempt. Same for apk.
If enableInteractiveSelection set to false effect is not reproduced.
On IOS this effect is not reproduced.
Code sample
Code sample
import 'package:flutter/material.dart';
void main() {
runApp(const MainApp());
}
class MainApp extends StatelessWidget {
const MainApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: Builder(builder: (context) {
return ElevatedButton(
onPressed: () {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => const Screen(),
),
);
},
child: const Text('Navigate'),
);
}),
),
),
);
}
}
class Screen extends StatelessWidget {
const Screen({super.key});
@override
Widget build(BuildContext context) {
final list = List.generate(30, (index) => index);
return Scaffold(
appBar: AppBar(),
body: Padding(
padding: const EdgeInsets.all(20),
child: ListView(
children: [
TextFormField(
enableInteractiveSelection: true,
onTapOutside: (event) =>
FocusManager.instance.primaryFocus?.unfocus(),
),
...list.map(
(e) => ListTile(
title: Text(e.toString()),
),
),
],
),
),
);
}
}
Screenshots or Video
Screenshots / Video demonstration
2023-06-06.11.59.22.mov
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.10.3, on macOS 13.4 22F66 darwin-arm64, locale ru-BY)
• Flutter version 3.10.3 on channel stable at /Users/oleg/fvm/versions/3.7.2
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision f92f44110e (4 days ago), 2023-06-01 18:17:33 -0500
• Engine revision 2a3401c9bb
• Dart version 3.0.3
• DevTools version 2.23.1
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/oleg/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
[✓] VS Code (version 1.78.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.66.0
[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.4 22F66 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 113.0.5672.126
[✓] Network resources
• All expected network resources are available.
• No issues found!Metadata
Metadata
Assignees
Labels
a: 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.10Found to occur in 3.10Found to occur in 3.10found in release: 3.11Found to occur in 3.11Found to occur in 3.11frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyAndroid applications specifically