Browse Source

Merge pull request #187 from airtonix/patch-1

remove backdrop from proper element.
pull/202/merge
Connor Sears 11 years ago
parent
commit
82b9cde7e6
  1. 9
      lib/js/popovers.js

9
lib/js/popovers.js

@ -16,7 +16,7 @@
};
var onPopoverHidden = function () {
document.body.removeChild(backdrop);
popover.parentNode.removeChild(backdrop);
popover.style.display = 'none';
popover.removeEventListener('webkitTransitionEnd', onPopoverHidden);
}
@ -46,7 +46,7 @@
return popover;
}
window.addEventListener('touchend', function (e) {
var showHidePopover = function (e) {
var popover = getPopover(e);
if (!popover) return;
@ -56,8 +56,9 @@
popover.classList.add('visible');
popover.parentNode.appendChild(backdrop);
});
};
window.addEventListener('click', function (e) { if (getPopover(e)) e.preventDefault(); });
window.addEventListener('touchend', showHidePopover);
window.addEventListener('click', showHidePopover);
}();

Loading…
Cancel
Save