Skip to content
This repository has been archived by the owner on Sep 10, 2019. It is now read-only.

Panel: undefined srcElement #548

Closed
laurent-le-graverend opened this issue Mar 24, 2015 · 1 comment
Closed

Panel: undefined srcElement #548

laurent-le-graverend opened this issue Mar 24, 2015 · 1 comment

Comments

@laurent-le-graverend
Copy link
Contributor

Not sure why there is this check, getting a JS error when clicking somewhere in the panel:

Getting error: Uncaught TypeError: Cannot read property 'href' of undefined

https://github.com/zurb/foundation-apps/blob/master/js/angular/components/panel/panel.js#L130

  element.on('click', function(e) {
    //check sizing
    var srcEl = e.srcElement;
    [...]

srcElement seams to be something for IE?
https://developer.mozilla.org/en-US/docs/Web/API/Event/target

@gakimball
Copy link
Contributor

Yep, that should be e.target instead of e.srcElement.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants