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

update mask blocking backspace on iOS #64

Open
JulioCRFilho opened this issue Jan 26, 2021 · 2 comments
Open

update mask blocking backspace on iOS #64

JulioCRFilho opened this issue Jan 26, 2021 · 2 comments

Comments

@JulioCRFilho
Copy link

Hi guys, as the title says, I'm not being able to delete any character in the input field.

Here's the code:
doc.addListener(() { doc.updateMask( doc.text.length >= 15 ? '00.000.000/0000-00' : '000.000.000-000'); });

This problem only occurs on iOS simulator, I hadn't the chance to test it on a device yet. I even tried it on different versions of iOS simulator but nothing changed.

@JulioCRFilho
Copy link
Author

Any thoughts on this?

@henriquezanfa
Copy link

Same thing is happening here when using beforeChange (just like the documentation).

It works fine on Android devices but on iOS I can't delete anything.

_controller.beforeChange = (String previous, String next) {
      if (next.length > 9)
        _controller.updateMask('000.000.000-00');
      else
        _controller.updateMask('000000-0');
      return true;
};

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

2 participants