Long ngMessage causes box to grow in horizontal space
Issue: A long ngMessage causes a box to grow in horizontal space Angular version: 1.03 Browser: Chrome, others not tested Example: http://codepen.io/noilly/pen/PZyreb
I'm not sure this is a problem with ngMessage as it just hides/shows a <div>. For instance, take the following Codepen: http://codepen.io/topherfangio/pen/VeqWWg?editors=1010
We simply show a standard <div> when the button is clicked and it too makes the box grow. This is the nature of HTML and CSS. If you want the containing box to stay the same size, you'll need to set it's size using the width/height properties, or perhaps some of the flex layout attributes.
Did this work differently for you in a prior version of Material?
@topherfangio - Here is an example where the input message was too long: http://codepen.io/team/AngularMaterial/pen/NxZZjY.
See login dialog, email error message
I was forced to use this:
md-input-container {
.md-input-messages-animation {
max-width:300px;
}
}
- The class
.md-input-messages-animationwas not intuitive - Seems like it should be max-bound by the parent container:
md-input-container?
@ThomasBurleson I see what you're saying.
I suppose we could calculate it in JS every time we show the message and set the max-width property to match the parent. My only concern (and it's a tiny one at that), is that resizing the parent container to make it bigger would misalign the messages with the input.
This issue is closed as part of our ‘Surge Focus on Material 2' efforts. For details, see our forum posting @ http://bit.ly/1UhZyWs.