Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Fix issue #392 not changed value mask #393

Closed
wants to merge 2 commits into from

Conversation

JosielFaleiros
Copy link

This pull request is to fix the problem found in the issue #392 , where the value do not get masked when the same value is pasted twice, but it should apply the mask in that case.

This code is working on a local build, and within a project where I am using this lib.

Improvement suggestions are welcome. :)

@probil
Copy link
Owner

probil commented May 21, 2019

@JosielFaleiros
Can you add tests as well please?

@JosielFaleiros
Copy link
Author

Hi @probil

I would like to, but I am little busy these days, this will take some time, so any help from other devs for this are welcome too.

Thanks for the project!

@JosielFaleiros
Copy link
Author

Hi @probil

I've added a test to verify the case explained, that will be fixed by this PR.
I hope you find it valid now.

@probil
Copy link
Owner

probil commented Jun 16, 2019

Hey @JosielFaleiros
I've check your PR and it works well for your case but doesn't work for another case.
It's impossible to remove placeholder symbol from the input.

  1. Let's say I have mask ##:##
  2. I have entered 1111, value became 11:11
  3. I pressed backspace 2 times, value became 11:
  4. I pressed backspace one more time but value is still 11:, expected result is 11
    So it stuck

I'm going to add this test to unit tests and will try to find a solution that handles both cases

@probil probil closed this Jun 16, 2019
@probil
Copy link
Owner

probil commented Jun 16, 2019

#415

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

Successfully merging this pull request may close these issues.

2 participants