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

maxlength issue in 1.3.0 beta 15 (invalid -> valid) #8234

Closed

Description

@snekbaev

Hi,

I was using beta 11 and everything was fine, upgraded to 15 and got the issue.
I output a complex object with several ng-repeats etc, which eventually boils down to something like:

<input class="form-control" name="questionText" type="text" ng-model="question.text" placeholder="{{ 'ContentEntity_EvaluateTask_ClaimPlaceholder' | i18n }}" maxlength="150" required />

I have CSS classes setup that highlight invalid fields with red. So after upgrade to beta 15 when entire object is rendered I see that input fields become red (my css style for invalid state) for a fraction of a second and then back to "valid" (non red). When I remove the maxlength attribute - no blinking occurs. As I mentioned beta 11 works just fine.

Thank you!

P.S.: using IE11

Activity

  1. Narretz commented on Jul 17, 2014

    @Narretz
    Contributor

    Can you please provide a reproduction in a plnkr.co or similar?

  2. added this to the Purgatory milestone on Jul 17, 2014
  3. snekbaev commented on Jul 17, 2014

    @snekbaev
    Author

    Hi,
    sure, here you go: http://plnkr.co/mY219dSGAl1EEngRRavr
    open in IE11 and you will see a quick red blink. If you comment out beta.15 script reference and put back beta.5 - no blinking occurs. While using beta.15 script try removing the "maxlength" attribute and you will see that blinking doesn't happen.
    Thank you!

  4. caitp commented on Jul 17, 2014

    @caitp
    Contributor

    just tried this on saucelabs and I'm not seeing the issue? (I did modify the plunk to use ng-maxlength rather than maxlength though, because browsers will tend to not allow you to enter more characters than the actual maxlength attribute value).

  5. Narretz commented on Jul 17, 2014

    @Narretz
    Contributor

    I checked on IE11, I see the issue, and it's truly confusing.
    In the plunker, for the working input, I replaced maxlength with ng-maxlength and then the error appears there, too. However, when I replace ng-maxlength on the non-working example, nothing changes.

    Also, the flash appears first in beta.12, which is when the validator refactoring was introduced. I remember there was a bug with ng-maxlength and initial validation, maybe that is related.

    It's pretty strange though that only the input in ngRepeat is affected

  6. modified the milestones: , Purgatory on Jul 17, 2014
  7. snekbaev commented on Jul 17, 2014

    @snekbaev
    Author

    Hi @caitp ,
    thank you for your reply. I opened that plnkr and saw the blinking. I changed my local version to use ng-maxlength, I still see the blinking, moveover, now I can enter more characters than the limit I've set (though field gets marked as invalid). That's why I was using the maxlength because it was limiting the input.

  8. snekbaev commented on Jul 17, 2014

    @snekbaev
    Author

    @Narretz I jumped from 11 to 15, quickly checked that it was reworked from the sources, but didn't check since which version :) but yeah, apparently you found it too :) I'm staying with beta11 meanwhile, otherwise I have massive red blinking on every tree item selection :)
    Thank you!

  9. 59 remaining items

  10. added a commit that references this issue on Sep 30, 2014
    3dd77e0
  11. added a commit that references this issue on Oct 2, 2014
    1ff233d
  12. assigned and unassigned on Oct 3, 2014
  13. tbosch commented on Oct 3, 2014

    @tbosch
    Contributor

    Assigned to @caitp as she is working on a PR for this

  14. added 3 commits that reference this issue on Oct 3, 2014
    11a1f4c
    c5a060f
    6233f0c
  15. added a commit that references this issue on Oct 9, 2014
    96fa23e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions