Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse - preventDefault only on <a> elements not inside the collapse element #23666

Merged
merged 1 commit into from
Aug 25, 2017

Conversation

Johann-S
Copy link
Member

Should prevent default only on <a> elements not inside the collapse element

/CC @nelisbijl
Close: #22866

@@ -57,7 +57,7 @@ <h5 class="mb-0">
</div>
</div>

<script src="../../../docs/assets/js/vendor/jquery-slim.min.js"></script>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you go through all visual test files and see if there are more references like that and replace all of them?

Copy link
Member Author

@Johann-S Johann-S Aug 25, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was the only one I forget 😄 (I made a check)

@@ -361,7 +361,8 @@ const Collapse = (($) => {
*/

$(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE, function (event) {
if (!/input|textarea/i.test(event.target.tagName)) {
// preventeDefault only for <a> elements (which change the URL)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preventDefault

@Johann-S Johann-S merged commit 5a90b4a into v4-dev Aug 25, 2017
@Johann-S Johann-S deleted the v4-collapse-preventdefault branch August 25, 2017 08:48
@mdo mdo mentioned this pull request Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants