diff options
author | Patrick Yeo <patrick.yeo@liferay.com> | 2017-09-09 00:53:15 +0300 |
---|---|---|
committer | Patrick Yeo <patrick.yeo@liferay.com> | 2017-09-09 00:53:15 +0300 |
commit | 45276521778c9843c3d308f7fcda4168a75f4825 (patch) | |
tree | f1e7191217e53daac4184e8fb592fb2481a5148b /js | |
parent | cad22335ede2d2d9d0242f86cd859752bbfb14ea (diff) |
Collapse.js preventDefault if `[data-toggle="collapse"]` is an anchor tag
Diffstat (limited to 'js')
-rw-r--r-- | js/src/collapse.js | 2 |
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() } |