material icon indicating copy to clipboard operation
material copied to clipboard

mdSelect cuts off label text in IE

Open dozingcat opened this issue 11 years ago • 15 comments

Open https://material.angularjs.org/#/demo/material.components.select in IE (I used IE 11 under Windows 8.1). The mdSelect labels are truncated to just the first few characters, as shown in the attached screenshot.

Setting min-width on the md-select element is a possible workaround, but inconvenient if you don't know the width in advance.

ie-mdselect

dozingcat avatar May 07 '15 13:05 dozingcat

another workaround is to place it in an md-input-container

tinusn avatar May 08 '15 05:05 tinusn

md-input-container doesn't seem to have any effect for me: http://codepen.io/anon/pen/LVGGBX (displays as expected in Chrome and Firefox, truncated in IE). Do you have an example?

dozingcat avatar May 08 '15 12:05 dozingcat

It had an affect on a problem I had, but I see now that it was because of the layout surrounding the select box. Mine was fixed because it flexed to the surrounding box - and as you said, that could be solved by having a min-width, but I agree that it is not the best solution.

Anyone else have a solution for this?

tinusn avatar May 10 '15 17:05 tinusn

Looks like multiple culprits in IE11 could be to blame. After some quick tinkering, I seem to have narrowed it down to some CSS being applied as a result of the .md-select-label :first-child selector, and I can restore reasonable behavior by applying these two CSS styles:

flex-basis: auto;
overflow: visible;

It seems to make it behave correctly in IE11, but I imagine there's got to be some issues with that I'm not seeing right now. Again, this is just a rapid check on my end as I'm plowing through other IE11 issues.

Londovir avatar May 14 '15 12:05 Londovir

@dozingcat Is this still an issue in 0.10.0? I believe it should have been resolved. Closing for now, will reopen if it is still valid.

robertmesserle avatar Jun 16 '15 16:06 robertmesserle

Still an issue, at least based upon the demo site https://material.angularjs.org/HEAD/#/demo/material.components.select

Chrome Examples image

image

image

IE 11 Examples image

image

image

Londovir avatar Jun 17 '15 17:06 Londovir

Yes, this is still an issue with 0.10.0. I'm using

.md-select-label :first-child{
  flex-basis: auto;
  max-width: 100%;
  overflow: hidden;
}

to have the same behavior as in Chrome.

sitic avatar Jun 19 '15 21:06 sitic

I also have this issue. Remove display:flex seems to fix it.

barryvdh avatar Jul 01 '15 14:07 barryvdh

I'm still seeing this in IE as well. The demo page select components are still truncated, and you can also see a simple example at http://codepen.io/anon/pen/LEmgvE

dozingcat avatar Jul 03 '15 03:07 dozingcat

@rschmukler - reopened.

ThomasBurleson avatar Jul 06 '15 13:07 ThomasBurleson

In IE 10 - the arrow is below the text

capture

wlingke avatar Jul 06 '15 21:07 wlingke

@wlingke that is issue #2213

sitic avatar Jul 07 '15 01:07 sitic

+1

kikhtenko avatar Sep 17 '15 13:09 kikhtenko

Add this for ie 10 fix..

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { .md-select-value .md-select-icon::after { float: right; } .md-select-value *:first-child { display:block } md-select .md-select-value { height: 25px; } }

pradeep330 avatar Sep 23 '15 05:09 pradeep330

This is fixed on master. Closing.

rschmukler avatar Nov 20 '15 21:11 rschmukler