Do not use preventDefault() with .close-popover when there is no popover opened

This commit is contained in:
Frederic Guillot 2015-09-26 15:07:33 -04:00
parent 02106b4747
commit 47c1bc9652
2 changed files with 8 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -21,11 +21,14 @@ Popover.prototype.open = function(link) {
};
Popover.prototype.close = function(e) {
if (e) {
e.preventDefault();
}
if (this.isOpen()) {
$('#popover-container').remove();
if (e) {
e.preventDefault();
}
$('#popover-container').remove();
}
};
Popover.prototype.onClick = function(e) {