fix(js): use Bootstrap 5 vanilla API for tooltips#2723
Open
mroderick wants to merge 1 commit into
Open
Conversation
mroderick
force-pushed
the
feature/fix-bootstrap-5-tooltip
branch
from
July 25, 2026 16:36
718dfc8 to
d24b811
Compare
`$('[data-bs-toggle="tooltip"]').tooltip()` is not a function in Bootstrap 5
because the bootstrap gem ships vanilla JS. The resulting TypeError aborted
the application.js DOM-ready callback before Chosen was initialised, breaking
Chosen-dependent dropdowns.
Replace the jQuery call with Bootstrap 5's vanilla API and update the
meeting feature spec to assert the organiser avatar's alt text instead of
tooltip title, since Bootstrap 5's Tooltip constructor moves title to
data-bs-original-title.
mroderick
force-pushed
the
feature/fix-bootstrap-5-tooltip
branch
from
July 25, 2026 16:44
d24b811 to
33be9cc
Compare
mroderick
marked this pull request as ready for review
July 25, 2026 16:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks local verification of #2721.
Problem
$('[data-bs-toggle="tooltip"]').tooltip()is not a function in Bootstrap 5, because thebootstrapgem ships vanilla JS rather than jQuery plugins. The resultingTypeErroraborts the$(function() {...})callback inapplication.jsbefore Chosen is initialised, which breaks any feature that depends on Chosen (e.g. the admin event chapters dropdown).Change
app/assets/javascripts/application.js.spec/features/admin/meeting_spec.rbto assert the organiser avatar'salttext instead of the tooltiptitleattribute. Bootstrap 5's Tooltip constructor movestitletodata-bs-original-titleand removes the original attribute, so the previous assertion only passed while tooltips were broken.Verification
bundle exec rspec spec/features/admin/meeting_spec.rb --seed 6016— 9 examples, 0 failures.bundle exec parallel_rspec spec/ -n 6 --only-group 4 --test-options '--seed 6016'— 175 examples, 0 failures.Related
span[title="..."]could no longer be found after tooltips were correctly initialised.