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-popup - impossible to reuse single popup from multiple toggles #782

Open WojciechLuczkow opened 8 years ago

WojciechLuczkow commented 8 years ago

When: I had list with buttons having different id with zf-popup-toggle I had one zf-popup

Expected: I wanted to toggle popup for each button directly under them

Actual: Popup shows where first button was pressed, if first button shows only onHover then popup shows in top left of body with half of it cut

Solution proposal: in foundation-apps.js :: module foundation.popup :: function tetherElement(target)

if(tetherInit) {
    if (target !== scope.target.id) {
        scope.target = document.getElementById(target);
        tether.target = scope.target;
    }
    return;
}