diff options
author | diosmosis <diosmosis@users.noreply.github.com> | 2020-10-20 04:55:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-20 04:55:38 +0300 |
commit | 8e14326fa704c38e5e27859c3bb4b081e51d8e11 (patch) | |
tree | 81e0a30970c0c82a023a76bc5bb0d34f5cb2dbc3 /plugins/CoreHome/angularjs/common | |
parent | 6029f2c118c6ce3af4ef9b4e35a230b2faed744b (diff) |
Do not always initialize dropdown element if the element is no longer on the page. (#16593)
Diffstat (limited to 'plugins/CoreHome/angularjs/common')
-rw-r--r-- | plugins/CoreHome/angularjs/common/directives/dropdown-button.js | 2 |
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, |