Skip to content

Commit

Permalink
fix #289: missing new with bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey-wu committed May 25, 2024
1 parent 45dc195 commit aae02d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/multiplayer/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,9 @@ function upsertPlayerItem (player) {
`);

document.getElementById('player-list-group').appendChild(playerItem);
bootstrap.Popover(playerItem);
// bootstrap requires "new" to be called on each popover
// eslint-disable-next-line no-new
new bootstrap.Popover(playerItem);
}

document.getElementById('answer-form').addEventListener('submit', function (event) {
Expand Down
3 changes: 2 additions & 1 deletion client/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-tog
for (const tooltipTriggerEl of tooltipTriggerList) {
if (isTouchDevice()) continue;

bootstrap.Tooltip(tooltipTriggerEl);
// eslint-disable-next-line no-new
new bootstrap.Tooltip(tooltipTriggerEl);
}

account.getUsername().then(username => {
Expand Down

0 comments on commit aae02d4

Please sign in to comment.