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

input-container: ng-messages are no longer hidden on form reset as of 1.1.1 #9543

Closed

Description

@tom94zoe

Actual Behavior:

  • I tried to hide ng-message with the following code, since Angular Material 1.1.1 the message wasn't hidden on reset.
<md-input-container flex style="margin-top: 0;margin-bottom: 5px">
        <label translate>maintenanceMessage.description</label>
        <input md-maxlength="40" required name="description" md-no-asterisk
               ng-model="maintenanceMessageCtrl.newMaintenanceMessage.description" flex>
        <div ng-messages="maintenanceMessageForm.description.$error" ng-show="maintenanceMessageForm.description.$touched">
          <div ng-message="required" translate>maintenanceMessage.description.requiredMessage</div>
          <div ng-message="md-maxlength" translate>maintenanceMessage.description.maxLengthMessage</div>
        </div>
</md-input-container>
ctrl.resetFormAndHideDialog = function () {
      ctrl.newMaintenanceMessage = {};
      $scope.maintenanceMessageForm.$setUntouched();
      $scope.maintenanceMessageForm.$setPristine();
     };

Angular Versions: *

  • `Angular Version:1.5.8
  • Angular Material Version:1.1.1

angular-material-ng-message

Activity

  1. botjaeger commented on Sep 8, 2016

    @botjaeger

    yea me too, i'm experiencing that kind of issue. so i decided to go back to Angular Material Version 1.1.0rc5

  2. botjaeger commented on Sep 8, 2016

    @botjaeger

    hope someone can help us here. cause i really need the new browser color feature of new update in angular material

  3. tom94zoe commented on Sep 8, 2016

    @tom94zoe
    Author

    That would be fine, but I think this bug will be fixed with 1.1.3. So we have to wait some weeks.

  4. added this to the 1.1.3 milestone on Oct 14, 2016
  5. ThomasBurleson commented on Oct 14, 2016

    @ThomasBurleson
    Contributor

    @tom94zoe - can you provide a CodePen for use to verify fixes?

  6. added
    needs: demo
    on Oct 14, 2016
  7. rhinoceraptor commented on Oct 18, 2016

    @rhinoceraptor

    @ThomasBurleson Here is a codepen I made showing the bug:

    https://codepen.io/rhinocerapt0r/pen/ORBQJZ?editors=1011

    To replicate it, focus and un-focus the text field, then hit the reset button. The error message should be hidden, but isn't.

  8. added and removed
    needs: demo
    on Oct 18, 2016
  9. clshortfuse commented on Oct 18, 2016

    @clshortfuse
    Contributor

    @rhinoceraptor Thanks! This does confirm my suspicion that this is related to ngAnimate. I believe I had commented before on a similar issue where I mentioned we have solution built in an internal PR. The code will need to be cherrypicked.

  10. rhinoceraptor commented on Oct 18, 2016

    @rhinoceraptor

    I forgot to mention, if you change the version of the Angular material CSS and JS to 1.0.9, you can see it working properly.

  11. rhinoceraptor commented on Oct 18, 2016

    @rhinoceraptor

    I think this is a duplicate issue. I couldn't downgrade my version of angular material, so I used this CSS workaround:

    .ng-untouched ~ .md-input-messages-animation {
      opacity: 0;
    }
    
  12. samithaf commented on Nov 3, 2016

    @samithaf

    @rhinoceraptor the fix is working but there is a small UI defect and can be fixed by adding following.

     .ng-untouched ~ .md-input-messages-animation {
        height: 0;
        opacity: 0;
      }
    
  13. 15 remaining items

  14. added
    P1: urgent
    on Mar 20, 2017
  15. added
    severity: regression
    on Jul 30, 2018
  16. changed the title [-]Angular Material 1.1.1 hide ng-message on reset [/-] [+]input-container: ng-messages are no longer hidden on form reset as of 1.1.1[/+] on Jul 30, 2018
  17. modified the milestones: Future, 1.1.10 on Jul 30, 2018
  18. added and removed
    needs: investigation
    on Jul 30, 2018
  19. Splaktar commented on Jul 30, 2018

    @Splaktar
    Contributor

    This is fixed in 1.1.10 as seen in this updated CodePen.

    Originally fixed in 1.1.5 via 0151b4b.

  20. modified the milestones: 1.1.10, 1.1.5 on Feb 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1: urgenthotlist: animationsresolution: fixedseverity: regressiontype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions