alert.js: Avoid calling jQuery('#'), it's a syntax error in jQuery 3.0 #20019

Merged
merged 1 commit into from Jul 12, 2016

Projects

None yet

4 participants

@dmethvin
Contributor
dmethvin commented Jun 2, 2016

No description provided.

@dmethvin dmethvin alert: Avoid calling jQuery('#'), it's a syntax error in jQuery 3.0
dd77ecc
@twbs-savage
Member

Tests passed. Automated cross-browser testing via Sauce Labs and Travis CI shows that the JavaScript changes in this pull request are: CONFIRMED

Commit: dd77ecc
Build details: https://travis-ci.org/twbs-savage/bootstrap/builds/134788284

(Please note that this is a fully automated comment.)

@cvrebert cvrebert added js v4 labels Jun 2, 2016
@cvrebert cvrebert added this to the v4.0.0-alpha.3 milestone Jun 2, 2016
@cvrebert cvrebert referenced this pull request in houndci/hound Jun 5, 2016
Open

Hound frequently hanging on Bootstrap PRs #1150

@cvrebert cvrebert modified the milestone: v3.3.7, v4.0.0-alpha.3 Jun 5, 2016
@cvrebert cvrebert added v3 and removed v4 labels Jun 5, 2016
@cvrebert
Member

@dmethvin Is there a plausible scenario where this could occur that doesn't involve user error?

@cvrebert cvrebert referenced this pull request Jun 28, 2016
Merged

Support jQuery v3 in Bootstrap v4 #20191

2 of 2 tasks complete
@XhmikosR
Member

I wonder if this is the same error $('a[href*=#].

@dmethvin
Contributor

Is there a plausible scenario where this could occur that doesn't involve user error?

I'm honestly not sure but since it was happening in a unit test I assumed it might be done by users as well.

I wonder if this is the same error $('a[href*=#].

No, although that is also an invalid CSS selector. Special characters in attribute values must be quoted, per the spec.

@XhmikosR
Member

No, although that is also an invalid CSS selector. Special characters in attribute values must be quoted, per the spec.

Agreed, it's just that it stop working in a patch version build so it was a little unexpected :/

Now, about this PR, do you think you can add a test for this case?

@dmethvin
Contributor

Now, about this PR, do you think you can add a test for this case?

It was failing an existing test case before this PR, so I figured that fixing that one was enough. The failing test has this markup.

@XhmikosR
Member

Oh, cool. Then I have no objection in merging this. @cvrebert push the button if you agree.

@cvrebert
Member

The current v3 docs don't use the <a class="close" href="#" data-dismiss="alert"> markup anywhere. v3.0.0's docs had it in one place, where the live demo and the syntax-highlighted code were out of sync 😢

On account of compatibility paranoia, I'm okay with merging this.

@cvrebert cvrebert merged commit 1956146 into twbs:master Jul 12, 2016

2 of 3 checks passed

hound Hound is busy reviewing changes...
continuous-integration/savage CONFIRMED: Savage cross-browser JS tests passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mdo mdo referenced this pull request Jul 12, 2016
Closed

v3.3.7 ship list #18331

@n0nick n0nick added a commit to wazeHQ/bootstrap that referenced this pull request Dec 14, 2016
@n0nick n0nick dropdown.js: Avoid calling jQuery('#')
Calling jQuery('#') is considered a syntax error in jQuery 3.
This change avoids this issue, similar to the change in arrow.js
introduced in #20019.
b26a03a
@n0nick n0nick added a commit to wazeHQ/bootstrap-sass that referenced this pull request Dec 14, 2016
@n0nick n0nick dropdown.js: Avoid calling jQuery('#')
Calling jQuery('#') is considered a syntax error in jQuery 3.
This change avoids this issue, similar to the change in arrow.js
introduced in twbs/bootstrap#20019.
90331b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment