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

Can't delete digits on ios #199

Open
themightychris opened this issue Dec 22, 2024 · 4 comments
Open

Can't delete digits on ios #199

themightychris opened this issue Dec 22, 2024 · 4 comments
Assignees

Comments

@themightychris
Copy link

themightychris commented Dec 22, 2024

On iOS (tested 17.6.1 on real iPhone and latest 18.2 on simulator) you can't delete any input. I've tried with Flutter 3.24.4 and 3.27.0

Backspace will only visually erase one character. Repeated press of backspace will not delete more characters. If you enter any new characters it will append to the previous input without any of the deletes having taken effect.

To Reproduce
Steps to reproduce the behavior:

  1. Run a screen with pinput on an iOS device
  2. Enter any digits
  3. Press the backspace key
  4. Press backspace again or enter any new digits

Screenshots

simulator-18 2 (1)

Pinput version: 5.0.0

Smartphone (please complete the following information):

  • Device: iPhone Xr
  • OS: 17.6.1

Additional context

I stepped through the pinput state code with my debugger and found that in _handleTextEditingControllerChanges, here is what the sequence looks like typing in 1, 2, 3, and then pressing delete 3 times (as shown in the screenshot above). I couldn't find anything else to step through and find more clues. In this screencap there is 1 break per digit input and then 3 breaks per backspace

pinput-debugger

Here's my implementation, I've tried with all permutations of options stripped down as far as just child: Pinput() with no change in behavior: SquadQuest/SquadQuest#308

@itsji10dra
Copy link

@themightychris Any solution? hack? you found to overcome it?

@Tkko
Copy link
Owner

Tkko commented Feb 6, 2025

Sorry guys, I missed the notification. @themightychris could you please try to use StatefullWidget instead of ConsumerStatefulWidget

@Tkko
Copy link
Owner

Tkko commented Feb 6, 2025

Sorry guys, I missed the notification. @themightychris could you please try to use StatefullWidget instead of ConsumerStatefulWidget

It isn't about the ConsumerStatefulWidget. It's happening because of the AutofillGroup

@Tkko
Copy link
Owner

Tkko commented Feb 6, 2025

I was debugging for a while and couldn't figure out why the AutofillGroup is messing up the behavior. For now just remove it, as see in the screenshot you only have one field so you don't even need it.

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

3 participants