-
Notifications
You must be signed in to change notification settings - Fork 3.4k
fix(input): ngMessages height changing. #7146
Conversation
@EladBezalel Can you please review my changes when you get a moment? Everything looks good in the icons demo, but I wanted to double-check with you. |
@EladBezalel NVM...just noticed an alignment issue with the icons that I didn't see before :/ |
@@ -65,7 +65,15 @@ angular.module('material.components.input', [ | |||
*/ | |||
function mdInputContainerDirective($mdTheming, $parse) { | |||
|
|||
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'MD-SELECT']; | |||
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT', 'MD-SELECT']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be in a const?
Nice improvement @topherfangio LGTM. |
When using `ng-messages` inside of an input container, the height of the messages will change when appearing, which pushes other elements out of the way. This was a regression from the previous behavior which allowed space for a one-line message before pushing other content out of the way. This was caused by some changes to the icons inside of an input. Fix by finding an alternate method to address the icon issue. Fixes angular#7072.
2fbb63c
to
5619939
Compare
|
||
var LEFT_SELECTORS = INPUT_TAGS.reduce(function(selectors, isel) { | ||
return selectors.concat(['md-icon ~ ' + isel, '.md-icon ~ ' + isel]); | ||
}, []).join(","); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use .toString()
instead of .join(',')
they're equivalent on arrays
@EladBezalel Just wanted to touch base, is this ready for merge, or does it still need manual testing? :-) |
i've tested it manually and it's working good, what about the |
@EladBezalel I never knew that |
BTW |
@topherfangio - 👍 |
When using
ng-messages
inside of an input container, the heightof the messages will change when appearing, which pushes other
elements out of the way. This was a regression from the previous
behavior which allowed space for a one-line message before pushing
other content out of the way.
This was caused by some changes to the icons inside of an input.
Fix by finding an alternate method to address the icon issue.
Fixes #7072.