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

Auto Focus not working #197

Open
devbathani opened this issue Nov 29, 2024 · 4 comments
Open

Auto Focus not working #197

devbathani opened this issue Nov 29, 2024 · 4 comments
Assignees

Comments

@devbathani
Copy link

As in your function i have marked autofocus to true but still when i navigate to that respected page the autoFocus is not awaking the keyboard

Pinput(
length: 4,
defaultPinTheme: defaultPinTheme,
focusedPinTheme: defaultPinTheme.copyWith(
decoration: defaultPinTheme.decoration!.copyWith(
border: Border.all(color: greenColor),
),
),
autofocus: true,
controller: authState.otpController,
onCompleted: (value) {},
submittedPinTheme: defaultPinTheme,
),

Pinput version: 5.0.0

@ddragoste
Copy link

Are you having this issue on mobile web browsers or native android/ios app?

On mobile web browsers, it seems like user needs to do a specific direct action (tap, click, etc) to get the keyboard to be shown.
There is another issue opened for Pinput: #184, but it looks more like a general mobile web browser since it is documented also here flutter/flutter#58498, and here flutter/flutter#111433, and flutter/flutter#124205.
According to this comment: flutter/flutter#111433 (comment), it is not something that can be fixed in Flutter because it is a browser limitation on (some) mobile devices, unfortunately.

@devbathani
Copy link
Author

I am using ios simulator with cmd + k ON

@blingkonnerth
Copy link

I have the same issue on Mobile Web (Safari, iOS 18.1, iPhone 13).

Working fine on the App, but buggy for web

@Tkko
Copy link
Owner

Tkko commented Dec 8, 2024

Hey guys, the base functionalities like autofocus has the same implementation as the TextField widget in Flutter so please check if you have the same issue when you use TextField instead of Pinput, if yes it's most likely the bug in Flutter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants