-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ng-message of md-autocomplete is invisible #9468
Comments
@topherfangio Is this related to the ngMessages issues we experience right now? |
@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? |
I used the latest version |
@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 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 |
+1 |
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.
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.
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.
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
The text was updated successfully, but these errors were encountered: