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

ng-message of md-autocomplete is invisible #9468

Closed
tom94zoe opened this issue Aug 31, 2016 · 7 comments · Fixed by #9909
Closed

ng-message of md-autocomplete is invisible #9468

tom94zoe opened this issue Aug 31, 2016 · 7 comments · Fixed by #9909
Labels
has: Pull Request A PR has been created to address this issue P1: urgent Urgent issues that should be addressed in the next minor or patch release. resolution: fixed type: bug
Milestone

Comments

@tom94zoe
Copy link

Actual Behavior:
If you enter something and remove it, a required error message was shown.
If you try it a second time, the error message wasn't shown, because of the following style

md-input-container .md-input-message-animation:not(.ng-animate) { opacity: 0; margin-top: -100px; }.

CodePen (or steps to reproduce the issue): *
Used the floating label example of the demos

@devversion
Copy link
Member

@topherfangio Is this related to the ngMessages issues we experience right now?

@topherfangio
Copy link
Contributor

@devversion Not sure; it sounds related but I'm having trouble reproducing the issue.

@tom94zoe Can you please provide the link to our docs so we know what version you were testing against?

@topherfangio topherfangio added the needs: more info The issue does not contain enough information for the team to determine if it is a real bug label Aug 31, 2016
@tom94zoe
Copy link
Author

tom94zoe commented Sep 1, 2016

I used the latest version
https://material.angularjs.org/latest/demo/autocomplete

@topherfangio
Copy link
Contributor

@tom94zoe I can't seem to produce this against latest or HEAD (which has my recent ng-messages fixes for input).

Can you help me better understand how to reproduce it? Also, can you test against https://material.angularjs.org/HEAD/demo/autocomplete to make sure it hasn't already been fixed?

@tom94zoe
Copy link
Author

tom94zoe commented Sep 2, 2016

nimbus-record-video

I also tested it against the head. As you can see the error message is hidden.
Maybe I am missing something or cannot see it.

@topherfangio
Copy link
Contributor

@tom94zoe Got it; thanks for the screenshot. I can definitely reproduce now.

At first guess, it might be related to the fact that the element actually has a value even though it's not one of the supplied options, so something with the ng-required might be getting confused.

@topherfangio topherfangio added type: bug and removed needs: more info The issue does not contain enough information for the team to determine if it is a real bug labels Sep 2, 2016
@topherfangio topherfangio added this to the 1.1.2 milestone Sep 2, 2016
@topherfangio topherfangio added the P1: urgent Urgent issues that should be addressed in the next minor or patch release. label Sep 2, 2016
@prateekchoudhary
Copy link

+1

@devversion devversion removed their assignment Oct 18, 2016
@topherfangio topherfangio added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Oct 24, 2016
topherfangio added a commit to profoundry-us/material that referenced this issue Oct 24, 2016
In certain scenarios, the `ng-messages` of an autocomplete would
fail to animate properly leaving them in a state where they were
in the DOM, but not visible to the user.

This was ultimately caused by the animations not properly retrieving
the messages element to animate, but was also tangentially caused by
the animations not properly calling the `done` callback upon failure.

There are three associated fixes:

 1. Logging a warning if the messages element or it's children cannot
    be found.
 2. Ensure the `done` callback always fires even on failures.
 3. Ensure the `getMessagesElement()` method correctly returns when
    the element passed IS the messages element itself.

Fixes angular#9468.
topherfangio added a commit to profoundry-us/material that referenced this issue Oct 24, 2016
In certain scenarios, the `ng-messages` of an autocomplete would
fail to animate properly leaving them in a state where they were
in the DOM, but not visible to the user.

This was ultimately caused by the animations not properly retrieving
the messages element to animate, but was also tangentially caused by
the animations not properly calling the `done` callback upon failure.

There are three associated fixes:

 1. Log a warning if the messages element or it's children cannot be
    found.
 2. Ensure the `done` callback always fires even on failures.
 3. Ensure the `getMessagesElement()` method correctly returns when
    the element passed IS the messages element itself.

Fixes angular#9468.
@topherfangio topherfangio added has: Pull Request A PR has been created to address this issue and removed in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs labels Oct 24, 2016
topherfangio added a commit to profoundry-us/material that referenced this issue Nov 7, 2016
In certain scenarios, the `ng-messages` of an autocomplete would
fail to animate properly leaving them in a state where they were
in the DOM, but not visible to the user.

This was ultimately caused by the animations not properly retrieving
the messages element to animate, but was also tangentially caused by
the animations not properly calling the `done` callback upon failure.

There are three associated fixes:

 1. Log a warning if the messages element or it's children cannot be
    found.
 2. Ensure the `done` callback always fires even on failures.
 3. Ensure the `getMessagesElement()` method correctly returns when
    the element passed IS the messages element itself.

Fixes angular#9468.
@angular angular locked as resolved and limited conversation to collaborators Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue P1: urgent Urgent issues that should be addressed in the next minor or patch release. resolution: fixed type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants