Giter VIP home page Giter VIP logo

Comments (20)

sendiagustian avatar sendiagustian commented on September 26, 2024 2

In my case set keyboardType = KeyboardType.number, and when req focus call blink type text.

ScreenRecord_2024_05_17_11_36_55.mp4

from flutter.

darshankawar avatar darshankawar commented on September 26, 2024 1

@wuweijian1997 I was trying to understand the behavior that exists in previous version against the one which isn't working in latest. Please read the github code of conduct while commenting.

Coming back to the issue, I checked in stable 3.19.6 wherein the behavior is as below:

148527.mov

ie, tapping the collapse button also loses the focus from the textfield as shown, but in latest version, the focus remains in the textfield.

stable, master flutter doctor -v
[!] Flutter (Channel stable, 3.22.0, on macOS 12.2.1 21D62 darwin-x64, locale
    en-GB)
    • Flutter version 3.22.0 on channel stable at
      /Users/dhs/documents/fluttersdk/flutter
    ! Warning: `flutter` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
      your current Flutter SDK checkout at
      /Users/dhs/documents/fluttersdk/flutter. Consider adding
      /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
      Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
      of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (5 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[!] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! Flutter recommends a minimum Xcode version of 13.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.2

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

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

[✓] Connected device (5 available)
    • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
    • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
      ios            • iOS 14.4.1 18D61
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 98.0.4758.80

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.

[!] Flutter (Channel master, 3.22.0-35.0.pre.24, on macOS 12.2.1 21D62
    darwin-x64, locale en-GB)
    • Flutter version 3.22.0-35.0.pre.24 on channel master at
      /Users/dhs/documents/fluttersdk/flutter
    ! Warning: `flutter` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/flutter, which is not inside
      your current Flutter SDK checkout at
      /Users/dhs/documents/fluttersdk/flutter. Consider adding
      /Users/dhs/documents/fluttersdk/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to
      /Users/dhs/Documents/Fluttersdk/flutter/bin/dart, which is not inside your
      current Flutter SDK checkout at /Users/dhs/documents/fluttersdk/flutter.
      Consider adding /Users/dhs/documents/fluttersdk/flutter/bin to the front
      of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2b0d879ec7 (63 minutes ago), 2024-05-16 00:13:26 -0400
    • Engine revision 942d7c35de
    • Dart version 3.5.0 (build 3.5.0-160.0.dev)
    • DevTools version 2.36.0-dev.10
    • If those were intentional, you can disregard the above warnings; however
      it is recommended to use "git" directly to perform update checks and
      upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/dhs/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for
      more details.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 13C100
    • CocoaPods version 1.11.2

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

[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 65.1.4
    • Dart plugin version 213.7228

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

[✓] Connected device (3 available)
    • Darshan's iphone (mobile) • 21150b119064aecc249dfcfe05e259197461ce23 • ios
      • iOS 15.3.1 19D52
    • macOS (desktop)           • macos                                    •
      darwin-x64     • macOS 12.2.1 21D62 darwin-x64
    • Chrome (web)              • chrome                                   •
      web-javascript • Google Chrome 109.0.5414.119

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
      
[!] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    ! Flutter recommends a minimum Xcode version of 13.
      Download the latest version or update via the Mac App Store.
    • CocoaPods version 1.11.2

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

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

[✓] Connected device (5 available)
    • SM G975F (mobile)       • RZ8M802WY0X • android-arm64   • Android 11 (API 30)
    • Darshan's iphone (mobile)  • 21150b119064aecc249dfcfe05e259197461ce23 •
      ios            • iOS 14.4.1 18D61
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729     •
      ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                    •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                                   •
      web-javascript • Google Chrome 98.0.4758.80

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 1 category.



from flutter.

sendiagustian avatar sendiagustian commented on September 26, 2024 1

In my case set keyboardType = KeyboardType.number, and when req focus call blink type text.
ScreenRecord_2024_05_17_11_36_55.mp4

I have a similar issue anyone can help resolve this?

Until now I haven't found a solution

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024 1

In my case set keyboardType = KeyboardType.number, and when req focus call blink type text.
ScreenRecord_2024_05_17_11_36_55.mp4

I have a similar issue anyone can help resolve this?

Until now I haven't found a solution

Use Flutter 3.19.3. no flutter 3.22.0

from flutter.

YimZungWo avatar YimZungWo commented on September 26, 2024

Yes, I also encountered this problem after updating to 3.22

from flutter.

darshankawar avatar darshankawar commented on September 26, 2024

@wuweijian1997
I tried on stable 3.22.0 and was not able to replicate. After tapping on FAB, the textfield gets and focus and shows the active cursor as shown in video below:

148527.mov

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024

@wuweijian1997 I tried on stable 3.22.0 and was not able to replicate. After tapping on FAB, the textfield gets and focus and shows the active cursor as shown in video below:

148527.mov

image

click this to Collapse the keyboard.

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024

@darshankawar try click here.then try to focus the TextField
image

from flutter.

darshankawar avatar darshankawar commented on September 26, 2024

Tried the same but still couldn't replicate.

148527_1.mov

from flutter.

Bestfootballer avatar Bestfootballer commented on September 26, 2024

@wuweijian1997 Hi, I tried to reproduce the bug by following the order of the steps you wrote, but everything works fine for me too.

Registrazione.schermo.2024-05-17.alle.12.30.33.mov

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024

@darshankawar @Bestfootballer

FocusScope.of(context).requestFocus(smsInput); /// not work
flutter --version
Flutter 3.22.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5dcb86f68f (8 days ago) • 2024-05-09 07:39:20 -0500
Engine • revision f6344b75dc
Tools • Dart 3.4.0 • DevTools 2.34.3

Android.Emulator.-.Pixel_6_Pro_API_33_5554.2024-05-17.19-58-25.mp4

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024

Tried the same but still couldn't replicate.

148527_1.mov

click fab TextField not focus,you replicate it.

from flutter.

Bestfootballer avatar Bestfootballer commented on September 26, 2024

@wuweijian1997 I'm sorry, but I thought I had installed the latest version of Flutter when I did the test.
Anyway, I upgraded Flutter to latest version (3.22) and now the focus didn't work for me too.

Registrazione.schermo.2024-05-17.alle.14.38.55.mov

So @darshankawar , I confirm that this instruction isn't working:

FocusScope.of(context).requestFocus(smsInput);

flutter --version
Flutter 3.22.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5dcb86f68f (8 days ago) • 2024-05-09 07:39:20 -0500
Engine • revision f6344b75dc
Tools • Dart 3.4.0 • DevTools 2.34.3

from flutter.

darshankawar avatar darshankawar commented on September 26, 2024

@wuweijian1997 What's the expected behavior after tapping FAB ? Can you also show a video of it working in previous version ?

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024

@wuweijian1997 What's the expected behavior after tapping FAB ? Can you also show a video of it working in previous version ?

Are you OK?What is the code for fab?

from flutter.

justinmc avatar justinmc commented on September 26, 2024

@wuweijian1997 Is the behavior seen in the previous comment what you are expecting?

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024

@justinmc I expect the keyboard to be raised when running the code

FocusScope.of(context).requestFocus(smsInput);

But in 3.22.0, this doesn't work

from flutter.

nickfreza avatar nickfreza commented on September 26, 2024

In my case set keyboardType = KeyboardType.number, and when req focus call blink type text.

ScreenRecord_2024_05_17_11_36_55.mp4

I have a similar issue anyone can help resolve this?

from flutter.

croro613 avatar croro613 commented on September 26, 2024

It seems intentionally modified to prevent loss of focus, by this PR.

from flutter.

wuweijian1997 avatar wuweijian1997 commented on September 26, 2024

It seems intentionally modified to prevent loss of focus, by this PR.

Is this normal? This issue still exists in version 3.22.2

from flutter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.