material icon indicating copy to clipboard operation
material copied to clipboard

md-list-item: wrong align and word wrapping behavior in IE

Open stefan-schweiger opened this issue 11 years ago • 5 comments

These are acutally two bugs that only occur in IE (I've only tested it in IE11 but I guess it's the same for earlier version):

  1. (non-clickable) md-list-items only containing text align the text at the top
  2. clickable md-list-items with a long text get a weird word wrap

CODEPEN

IE11: IE Chrome: Chrome

<body ng-controller="AppCtrl" ng-app="MyApp" layout="row">
    <md-list class="md-whiteframe-z2">
        <md-list-item style="background: blue;">
            <span>Test 1</span>
        </md-list-item>
        <md-list-item ng-click="console.log('click')"  style="background: green;">
            <span>Test longlong button button button</span>
        </md-list-item>

        <md-list-item style="background: red;">
            <span>Test longlong text text text text</span>
        </md-list-item>
    </md-list>

    <div flex style="background: #CCC"></div>
</body>

stefan-schweiger avatar Jul 16 '15 11:07 stefan-schweiger

+1 maybe related to this issue? https://github.com/angular/material/issues/3528

JuHwon avatar Jul 21 '15 10:07 JuHwon

The reason of strange word wrap with an ng-click is because of the generated button with the class md-no-style which has a flex property set. If you do flex:none on these elements the word wrap is gone. The text align on top still remains though.

JuHwon avatar Jul 21 '15 12:07 JuHwon

I found out that the vertical textalignment will work if you specify a height. By default there is only a min-height set (on the md-list-item-inner class), which is breaking the align-items: center in IE. http://jsfiddle.net/e93Lho0q/

JuHwon avatar Jul 21 '15 14:07 JuHwon

Both of these issues appear to be fixed in master.

If you are still experiencing issues after upgrading; please comment and I will reopen.

topherfangio avatar Nov 23 '15 17:11 topherfangio

Yes, it is still appears in chrome and edge. try same link above or (http://codepen.io/anon/pen/pJZogz?editors=110). Now shrink the browser as closest as possible then you will see gap between lines.

ashraftm avatar Dec 04 '15 23:12 ashraftm