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

dropdown.js: Avoid calling jQuery('#') #21341

Closed
wants to merge 2 commits into from

Conversation

n0nick
Copy link

@n0nick n0nick commented Dec 14, 2016

Calling jQuery('#') is considered a syntax error in jQuery 3. [1]
This change avoids this issue, similar to the change in alert.js
introduced in #20019.

[1] https://jquery.com/upgrade-guide/3.0/#breaking-change-jquery-quot-quot-and-find-quot-quot-are-invalid-syntax

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#20019.
Otherwise, 'bundle install --deployment' complains of a corrupt
Gemfile.lock.
@bardiharborow
Copy link
Member

Note that support for v3 has mostly ceased. Please let us know if this affects v4. Pinging @mdo as we might want to backport this to v3 anyway (?).

@Johann-S
Copy link
Member

Currently it's not the case in V4 for dropdown.js
https://github.com/twbs/bootstrap/blob/v4-dev/js/src/dropdown.js

@n0nick
Copy link
Author

n0nick commented Dec 15, 2016

Since Bootstrap v4 is not out yet, but jQuery 3 is, I would argue that this is worth considering. Otherwise, Bootstrap's dropdown.js script just throws JS syntax errors whenever included. This caused some application errors on my side.

Re v4 - as far as I can tell, this is already handled there.

@mdo
Copy link
Member

mdo commented Dec 20, 2016

Punting as a won't fix given v3's status.

@n0nick
Copy link
Author

n0nick commented Apr 19, 2019

FYI it seems this was resolved in 2ccfa57.

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.

4 participants