summaryrefslogtreecommitdiff
path: root/assets/js/src/Popover.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/src/Popover.js')
-rw-r--r--assets/js/src/Popover.js11
1 files changed, 7 insertions, 4 deletions
diff --git a/assets/js/src/Popover.js b/assets/js/src/Popover.js
index b978c087..e5bc1c88 100644
--- a/assets/js/src/Popover.js
+++ b/assets/js/src/Popover.js
@@ -21,11 +21,14 @@ Popover.prototype.open = function(link) {
};
Popover.prototype.close = function(e) {
- if (e) {
- e.preventDefault();
- }
+ if (this.isOpen()) {
+
+ if (e) {
+ e.preventDefault();
+ }
- $('#popover-container').remove();
+ $('#popover-container').remove();
+ }
};
Popover.prototype.onClick = function(e) {