materialize icon indicating copy to clipboard operation
materialize copied to clipboard

IE SVG Classlist

Open Schenn opened this issue 11 years ago • 6 comments

In the method getWavesEffectElement, you say if an element isn't an SVG Element and has a class do something, otherwise if its classList has a class of 'waves-effect' do something else. The way this IF is structured, an SVGElement is passed into the Else If. However, in IE, SVG Elements don't support the classList attribute, so line 1604 throws a 'Unable to get property 'contains' of undefined or null reference' error in the latest IE.

Schenn avatar Jun 08 '15 21:06 Schenn

+1

benjaminwols avatar Apr 29 '16 10:04 benjaminwols

+1

The getWavesEffectElement code hasn't changed in v0.97.7, so I guess the bug is still present.

Usually this problem occurs with svg icons inside buttons/links. I use this workaround:

svg.icon {
    pointer-events: none;
}

You might need to adapt this to your html structure.

fabyeah avatar Aug 01 '16 15:08 fabyeah

Unfortunately my workaround causes links with svg icons to not be clickable in Safari/IE/iOS, unless they're specifically set to display: block or inline-block. :(

I guess we need a PR. Unless someone has another solution?

fabyeah avatar Jan 05 '17 00:01 fabyeah

+1

DetlefPeters avatar Mar 10 '17 14:03 DetlefPeters

The bug was fixed over at the waves repo here. As soon v0.8.0 is getting released, we will merge the changes into materialize

tomscholz avatar Apr 03 '17 20:04 tomscholz

Fixed in 741d47a092ba4f09ce841c7fa98def1ce0dcfd2c

Dogfalo avatar Jul 03 '17 00:07 Dogfalo