Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

SVGElements do not shortcircuit getWavesEffectElement #145

Closed
tylerhirschel opened this issue Feb 2, 2016 · 3 comments
Closed

SVGElements do not shortcircuit getWavesEffectElement #145

tylerhirschel opened this issue Feb 2, 2016 · 3 comments

Comments

@tylerhirschel
Copy link
Contributor

https://jsfiddle.net/s5dpndws/
Error occurs when clicking on an svgElement in IE
I changed this on line 359:

function getWavesEffectElement(e) {
     ...
        while (target.parentElement !== null) {
            if (target.classList.contains('waves-effect') && (!(target instanceof SVGElement))) {
                element = target;
                break;
           }
            target = target.parentElement;
        }
     ...
    }

to:

function getWavesEffectElement(e) {
     ...
       while (target.parentElement) {
            if ( (!(target instanceof SVGElement)) && target.classList.contains('waves-effect')) {
                element = target;
                break;
            }
            target = target.parentElement;
        }
     ...
    }
@fians
Copy link
Owner

fians commented Feb 21, 2016

Does it fix the issue? If yes, can you please point me where should I make changes to fix it? It would be awesome if you can create a pull request for this. Thanks!

tylerhirschel added a commit to tylerhirschel/Waves that referenced this issue Feb 22, 2016
@tylerhirschel
Copy link
Contributor Author

fians pushed a commit that referenced this issue Feb 28, 2016
@fians
Copy link
Owner

fians commented Feb 28, 2016

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants