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

TextField on Mac OS Desktop platform doesn't work #70572

Closed
pkondratev opened this issue Nov 15, 2020 · 5 comments
Closed

TextField on Mac OS Desktop platform doesn't work #70572

pkondratev opened this issue Nov 15, 2020 · 5 comments
Labels
in triage Presently being triaged by the triage team

Comments

@pkondratev
Copy link

Steps to Reproduce

  1. Run flutter create bug.
  2. Update the files as follows:
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key,}) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Title'),
      ),
      body: Center(
        child: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: <Widget>[TextFormField()],
          ),
        ),
      ),
    );
  }
}
  1. Run app and try to achieve text field with mouse. It will be not selectable for mouse by click, but if you press down mouse, move cursor a bit and release mouse, text field will be selected. Now, type some text and try to move caret by mouse. It will be impossible using clicks, only by mouse down, move a bit and release button.

Expected results: Cursor sets by clicks of mouse.

Actual results: Not working with clicks, only with drag event.

Logs
flutter analyze
Running "flutter pub get" in test_flutter_app...                   384ms
Analyzing test_flutter_app... 
No issues found! (ran in 1.7s)
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, 1.24.0-7.0.pre, on macOS 11.0.1 20B29 darwin-x64, locale ru-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 12.2)
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] VS Code (version 1.51.1)
[✓] Connected device (3 available)

• No issues found!
Additional info (may be important) I have tried to use
theme: ThemeData(
   primarySwatch: Colors.blue,
   platform: TargetPlatform.fuchsia // android, iOS, macOS, windows also
),

It doesn't change anything.

Also I have tried to set

void main() {
  debugDefaultTargetPlatformOverride = TargetPlatform.fuchsia; // windows, iOS, macOS, android also not works
  runApp(MyApp());
}

And it doesn't change anything too

@pedromassangocode
Copy link

Hi @pkondratev
I cannot reproduce this issue on latest master and dev channel. The gif bellow was taken from dev channel.

gif44

flutter doctor -v
[✓] Flutter (Channel dev, 1.24.0-7.0.pre, on Mac OS X 10.15.7 19H2 darwin-x64, locale en)
    • Flutter version 1.24.0-7.0.pre at /Users/pedromassango/dev/SDKs/flutter_dev
    • Framework revision a0860f6e87 (2 weeks ago), 2020-10-29 20:07:34 -0700
    • Engine revision 073263e39d
    • Dart version 2.11.0 (build 2.11.0-260.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 12.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    • CocoaPods version 1.9.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.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 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 51.0.3
    • Dart plugin version 202.8070

[✓] VS Code (version 1.51.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.16.0

[✓] Connected device (3 available)
    • macOS (desktop)  • macos      • darwin-x64     • Mac OS X 10.15.7 19H2 darwin-x64
    • Web Server (web) • web-server • web-javascript • Flutter Tools
    • Chrome (web)     • chrome     • web-javascript • Google Chrome 86.0.4240.193

• No issues found!

@pedromassangocode pedromassangocode added in triage Presently being triaged by the triage team waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds labels Nov 16, 2020
@pkondratev
Copy link
Author

Hi. @pedromassangocode
It seems what it works if I click between letters, but if cursor stays on letter nothing happens.
The problem may be in new Mac OS Big Sur or external monitor (the same behaviour on MacBook Display).
For example, if I click on 'W' letter cursor not moves to left or right part of it.

flutter-bag

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Nov 16, 2020
@pkondratev
Copy link
Author

Additional info: Clicks not working without a little cursor move

@stuartmorgan
Copy link
Contributor

This is a case of #64961; closing as a duplicate.

@github-actions
Copy link

github-actions bot commented Aug 9, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
in triage Presently being triaged by the triage team
Projects
None yet
Development

No branches or pull requests

3 participants