material icon indicating copy to clipboard operation
material copied to clipboard

md-list-item preventing click event of elements which it contains in Firefox 38, IE10

Open bshir opened this issue 11 years ago • 15 comments

An md-list-item containing a button is not recognizing the click event of the button.

http://codepen.io/anon/pen/XbaOYO

Expected behavior: Click anywhere on the list item outside of the button and only list count will increment. Click the button and both button count and list count will increment.

Actual behavior: In Firefox 38 & IE10 clicking the button does not increment the button count; only the list count.

The button click is working in Chrome 43, Safari, and IE Edge

Related post from March discussing the topic of clickable list items combined with clickable child elements. It looks like implementation has changed a bit since then with the md-list-item directive and wrapping contents in an md-button. Still found this relevant though. https://groups.google.com/forum/#!searchin/ngmaterial/md-list-item$20expand/ngmaterial/8A-UGPftGfA/fZk-2HEB3xoJ

bshir avatar Jun 17 '15 11:06 bshir

Thank you for that info! I did not see it in the documentation previously. I now see it in the demo with the list items containing checkboxes. Thanks

bshir avatar Jun 18 '15 10:06 bshir

Oh, I deleted this answer, because I think you have another problem ) . Anyway it's bad that we have different behavior in different browsers. And I have problems with primary and secondary action in md-list-item in Firefox

webpartisan avatar Jun 18 '15 12:06 webpartisan

I agree... after further testing I'm still having issues with more complex items. Where each item is an editable ng-form with buttons.

bshir avatar Jun 18 '15 14:06 bshir

Appears to still be broken in FF40. Will investigate IE10 too.

topherfangio avatar Sep 04 '15 19:09 topherfangio

Appears to still be broken in RC2: http://codepen.io/topherfangio/pen/mejzbp

Will prioritize for RC4 (RC3 is coming too soon to get it in).

topherfangio avatar Nov 03 '15 18:11 topherfangio

Interesting note for me later: you can actually tab to the inner button and press enter and it behaves exactly as expected. So it must be something specifically with the actual mouse click.

topherfangio avatar Nov 03 '15 18:11 topherfangio

@bshir can you please check if it's still happening on HEAD?

EladBezalel avatar Jan 29 '16 13:01 EladBezalel

I can't click .md-secondary items in IE 10/11 and Firefox 44 with 1.0.5

kuhnroyal avatar Feb 09 '16 14:02 kuhnroyal

+1

manish2535 avatar Mar 09 '16 20:03 manish2535

@kuhnroyal Can you recheck your issue in HEAD again? I've changed a few things in the list, and now the button is separated from the content.

devversion avatar Mar 09 '16 20:03 devversion

+1. We face the same problem

AntonKL avatar Apr 11 '16 12:04 AntonKL

There is a work around I've found for this issue.

If you use an md-icon as the md-secondary you can click it in Firefox.

<md-icon md-svg-icon="content:add" ng-click="ctrl.select(item)" class="md-secondary" >
</md-icon>

ACDN avatar Apr 19 '16 16:04 ACDN

@ACDN Did you recheck with master yet?

It seems to be fixed with the latest changes.

  • http://codepen.io/DevVersion/pen/eZKgrG

devversion avatar Apr 19 '16 16:04 devversion

It does appear to be working. Strange I just downloaded the latest files before testing. Of well. Good to know that it is fixed.

ACDN avatar Apr 19 '16 17:04 ACDN

@ACDN Awesome, thanks for the quick response.

devversion avatar Apr 19 '16 17:04 devversion