Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <diosmosis@users.noreply.github.com>2020-10-20 04:55:38 +0300
committerGitHub <noreply@github.com>2020-10-20 04:55:38 +0300
commit8e14326fa704c38e5e27859c3bb4b081e51d8e11 (patch)
tree81e0a30970c0c82a023a76bc5bb0d34f5cb2dbc3 /plugins/CoreHome/angularjs/common/directives
parent6029f2c118c6ce3af4ef9b4e35a230b2faed744b (diff)
Do not always initialize dropdown element if the element is no longer on the page. (#16593)
Diffstat (limited to 'plugins/CoreHome/angularjs/common/directives')
-rw-r--r--plugins/CoreHome/angularjs/common/directives/dropdown-button.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/common/directives/dropdown-button.js b/plugins/CoreHome/angularjs/common/directives/dropdown-button.js
index 04ac857795..1a0c001007 100644
--- a/plugins/CoreHome/angularjs/common/directives/dropdown-button.js
+++ b/plugins/CoreHome/angularjs/common/directives/dropdown-button.js
@@ -26,7 +26,7 @@
element.attr('data-target', element.attr('data-activates'));
}
- if (element.attr('data-target')) {
+ if (element.attr('data-target') && $('#' + element.attr('data-target')).length) {
$(element).dropdown({
inDuration: 300,
outDuration: 225,