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

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Yeo <patrick.yeo@liferay.com>2017-09-09 00:53:15 +0300
committerPatrick Yeo <patrick.yeo@liferay.com>2017-09-09 00:53:15 +0300
commit45276521778c9843c3d308f7fcda4168a75f4825 (patch)
treef1e7191217e53daac4184e8fb592fb2481a5148b /js/src/collapse.js
parentcad22335ede2d2d9d0242f86cd859752bbfb14ea (diff)
Collapse.js preventDefault if `[data-toggle="collapse"]` is an anchor tag
Diffstat (limited to 'js/src/collapse.js')
-rw-r--r--js/src/collapse.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/src/collapse.js b/js/src/collapse.js
index acc959d40c..bf9c990ecc 100644
--- a/js/src/collapse.js
+++ b/js/src/collapse.js
@@ -363,7 +363,7 @@ const Collapse = (() => {
$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
// preventDefault only for <a> elements (which change the URL) not inside the collapsible element
- if (event.target.tagName === 'A' && !$.contains(this, event.target)) {
+ if (event.currentTarget.tagName === 'A') {
event.preventDefault()
}