Comments (20)
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.
@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.
In my case set keyboardType = KeyboardType.number, and when req focus call blink type text.
ScreenRecord_2024_05_17_11_36_55.mp4I have a similar issue anyone can help resolve this?
Until now I haven't found a solution
from flutter.
In my case set keyboardType = KeyboardType.number, and when req focus call blink type text.
ScreenRecord_2024_05_17_11_36_55.mp4I 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.
Yes, I also encountered this problem after updating to 3.22
from flutter.
@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 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
click this to Collapse the keyboard.
from flutter.
@darshankawar try click here.then try to focus the TextField
from flutter.
Tried the same but still couldn't replicate.
148527_1.mov
from flutter.
@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.
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.
Tried the same but still couldn't replicate.
148527_1.mov
click fab TextField not focus,you replicate it.
from flutter.
@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.
@wuweijian1997 What's the expected behavior after tapping FAB ? Can you also show a video of it working in previous version ?
from flutter.
@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.
@wuweijian1997 Is the behavior seen in the previous comment what you are expecting?
from flutter.
@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.
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.
It seems intentionally modified to prevent loss of focus, by this PR.
from flutter.
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)
- [tool_crash] RPCError HOT 1
- NPE in Surface.createOrUpdateSurface HOT 3
- https://github.com/flutter/flutter/issues/new?template=2_bug.md HOT 1
- Appbar scrollUnderElevation has strange behavior with multiple scrolls HOT 5
- Adding font scaling based on system font size for accessibility on desktop HOT 1
- [tool_crash] RPCError HOT 2
- Negative spacing in Flex widget HOT 2
- Dart -> Engine roll stopped on `dart fix` issues (?) HOT 10
- [Conductor] Enable override of engine mirror location HOT 1
- Error: 'WidgetStateProperty' is exported from both 'package:flutter/src/material/material_state.dart' and 'package:flutter/src/widgets/widget_state.dart'. export 'widgets.dart' HOT 4
- mac-1 lost external connection phone device. HOT 1
- mac-24 and mac-30 lost external connection phone device. HOT 1
- linux-6 lost external connection phone device. HOT 2
- mac-25 lost external connection phone device. HOT 1
- [tool_crash] RPCError HOT 1
- Swift Compiler Error (Xcode) HOT 1
- New project gives error in one Windows machine but not in another HOT 2
- [native_assets] Stop doing dry run in `flutter run` HOT 2
- mac-30 is dead. HOT 2
- Linux linux_android_aot_engine flaked in post submit HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flutter.