Open justinmc opened 2 years ago
This is still a problem even after @gspencergoog's TapRegion PR (https://github.com/flutter/flutter/pull/107262) was merged.
It looks like SelectionArea still the focus too fast. I think this can be fixed by request focus after a drag has started
When verifying issue #128116, I was checking this issue and see that this issue only occurs on web and desktop platforms. Meanwhile, it doesn't appear on mobile (Android, iOS). Updating corresponding labels.
Android | iOS | Web | MacOS | Linux | Windows |
---|---|---|---|---|---|
✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
✅: No Issue ❌: Issue reproduced
Having this issue on the web on Safari. Flutter 3.10.6 - Have also tried using SelectionContainer.disabled
which no result.
SelectionArea temporarily steals the focus from a text field in its child widget tree on tap down. In the gif, notice that the field temporarily turns grey (because focus is lost) as I slowly tap.
To reproduce
Expected: The field stays focused. Actual: The field briefly loses focus before being refocused on tap up.
Example
```dart import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: const MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatelessWidget { const MyHomePage({Key? key, required this.title}) : super(key: key); final String title; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(title), ), body: Center( child: Column( mainAxisAlignment: MainAxisAlignment.center, children:CC @chunhtai