zurb / foundation-apps

The first front-end framework created for developing fully responsive web apps.
http://foundation.zurb.com/apps
MIT License
1.58k stars 216 forks source link

zf-close-all #739

Open ksr583 opened 8 years ago

ksr583 commented 8 years ago

Clicking a link in a panel (even without an href attribute) closes the panel if .zf-close-all is on the body tag.

soumak77 commented 8 years ago

This has been resolved for ui-sref elements in PR https://github.com/zurb/foundation-apps/pull/736 with change https://github.com/fiboacademy/foundation-apps/commit/8922ec4215c5340bb5b3c8b64a904cb308b01d51. I'll update the code to check if click originated within an element that has an href tag.

ksr583 commented 8 years ago

In my case it's an attribute with no href or ui-sref (switching between tabs on an ng-switch)

soumak77 commented 8 years ago

The specific code that needs to be updated is https://github.com/fiboacademy/foundation-apps/blob/8922ec4215c5340bb5b3c8b64a904cb308b01d51/js/angular/components/common/common.js#L208-L211

Right now it doesn't call event.preventDefault() if the click originated within an element with ui-sref. I'll change that to a list of attributes with ui-sref and href. What other attributes should be added to the list to resolve your issue?