Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

What changes could have affected ui-mask? #9138

Closed
pocesar opened this issue Sep 17, 2014 · 9 comments
Closed

What changes could have affected ui-mask? #9138

pocesar opened this issue Sep 17, 2014 · 9 comments

Comments

@pocesar
Copy link
Contributor

pocesar commented Sep 17, 2014

I'm cross posting to angular-ui/ui-utils#294 because I need this working. I'm trying to fix it myself, and couldn't find what changes from beta.19 to rc0+ that broke it
When I type the cursor moves erroneously and the characters are input in wrong order. Plus, if the field has updateOn: 'default blue', debounce: {default: 700}, if I don't type fast enough, it clears the input, erasing everything I wrote

@pocesar
Copy link
Contributor Author

pocesar commented Sep 17, 2014

need to investigate it further, on plunkr, without no other directives on the input, it works
http://plnkr.co/edit/Uk6eM996MFA3uxl3j6pq?p=preview

I'm trying to reproduce the problem I'm facing after updating angular

@shahata
Copy link
Contributor

shahata commented Sep 18, 2014

this plunker works fine for me... can you explain how to reproduce the issue?

@pocesar
Copy link
Contributor Author

pocesar commented Sep 18, 2014

yes, I'm trying to recreate part of my app (that's kinda huge). right now it works on plunkr but doesn't on my app

I'm wild guessing this is the problem 3e51b84#diff-c244afd8def7f268b16ee91a0341c4b2R1003 the logic changed
or maybe 1eda183
or even fdf9989

I'm re$compiling the same input over and over, mixed with transclusion, by different directives that add helper directives to elements, I just can't seem to find where it's choking, because it just worked before

@jeffbcross
Copy link
Contributor

@matsko mind taking a look when @pocesar has a failing reproduction?

@jeffbcross jeffbcross added this to the 1.3.0-rc.3 milestone Sep 18, 2014
@pocesar
Copy link
Contributor Author

pocesar commented Sep 19, 2014

I'm really frustated that I can't reproduce yet, and I couldn't make it work on my own app yet...

removing each directive from my inputs, it seems to be the one that I put in the plunkr (cleanMask / cleanViewValue), but on the plunkr it works, and not in my code

EDIT: ok, lastest plunkr version have one of the problems.

  1. Fill the input using 99999999
  2. nascimento validation is added to the ngModel $error
  3. Leave the field
  4. Enter the field again, backspace it
  5. Try to write a number (expected that it won't be input to the field, only the second keypress) or try to wait 700ms between keypresses
  6. The field will now have this problem forever and nascimento will never be valid (mininum valid date is 19/09/2001)

from what I can see in the DOM data view, the field when entered has a $modelValue set to undefined then it becomes "", every 700ms or so

EDIT2: Although reviewing the migration guide from Angular, the post link is from low to high. Maybe that's something to do and transcluded inputs needs a different approach, but this same code used to work on beta 19 (besides the $compileProvider.debugInfoEnabled(true); part)

@jeffbcross jeffbcross modified the milestones: 1.3.0-rc.3, 1.3.0 Sep 22, 2014
@jeffbcross jeffbcross modified the milestones: 1.3.0, Backlog Sep 29, 2014
@ghost
Copy link

ghost commented Sep 30, 2014

I ran a git bisect. The commit which caused the bug is 3e51b84

@Narretz
Copy link
Contributor

Narretz commented Oct 18, 2014

@pocesar I saw you have opened a PR in angular-ui to update ui-mask to 1.3.x. Does that mean we can close this issue?

@Narretz
Copy link
Contributor

Narretz commented Oct 20, 2014

I think this might be the same issue as #9156, caused by 3e51b84

@Narretz
Copy link
Contributor

Narretz commented Dec 9, 2014

We pushed a fix to $render (42d09f1), and for setting the viewValue inside a parser (2d6a0a1), which might have helped with ui-mask's issues. Since the problem in this issue was quite vague, I'm gonna close it now.

@Narretz Narretz closed this as completed Dec 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants