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

TVIST1-828: Use document on load rather than ready #375

Merged
merged 2 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ about writing changes to this log.

## [Unreleased]

- [PR-375](https://github.com/itk-dev/naevnssekretariatet/pull/375)
Use document on load rather than ready.

## [1.5.0] 2023-05-22

- [PR-373](https://github.com/itk-dev/naevnssekretariatet/pull/373)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To get a local copy up and running follow these simple steps.
docker compose run --rm node yarn dev
```

and to watch for for changes run
and to watch for changes run

```sh
docker compose run --rm node yarn watch
Expand Down
3 changes: 1 addition & 2 deletions assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ import './app.scss'
import * as bootstrap from 'bootstrap'
import '@popperjs/core'
import 'bs-custom-file-input'
import $ from 'jquery'
import 'select2'

const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle="tooltip"]')

$(document).ready(() => {
window.addEventListener('load', () => {
[...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl))
window.dispatchEvent(new Event('ajaxload'))
})
Loading