1
0
Fork 0

Adding upstream version 5.3.6+dfsg.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-08 06:13:50 +02:00
parent 96570520fe
commit c084e7d586
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
593 changed files with 26219 additions and 18272 deletions

View file

@ -14,7 +14,7 @@ import { executeAfterTransition, getElement } from './util/index.js'
* Constants
*/
const VERSION = '5.3.5'
const VERSION = '5.3.6'
/**
* Class definition
@ -45,6 +45,7 @@ class BaseComponent extends Config {
}
}
// Private
_queueCallback(callback, element, isAnimated = true) {
executeAfterTransition(callback, element, isAnimated)
}

View file

@ -204,11 +204,11 @@ class Collapse extends BaseComponent {
this._queueCallback(complete, this._element, true)
}
// Private
_isShown(element = this._element) {
return element.classList.contains(CLASS_NAME_SHOW)
}
// Private
_configAfterMerge(config) {
config.toggle = Boolean(config.toggle) // Coerce string values
config.parent = getElement(config.parent)

View file

@ -207,6 +207,9 @@ class Dropdown extends BaseComponent {
this._element.setAttribute('aria-expanded', 'false')
Manipulator.removeDataAttribute(this._menu, 'popper')
EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)
// Explicitly return focus to the trigger element
this._element.focus()
}
_getConfig(config) {

View file

@ -135,7 +135,6 @@ class Toast extends BaseComponent {
}
// Private
_maybeScheduleHide() {
if (!this._config.autohide) {
return

View file

@ -1,4 +1,4 @@
## How does Bootstrap's test suite work?
## How does Bootstraps test suite work?
Bootstrap uses [Jasmine](https://jasmine.github.io/). Each plugin has a file dedicated to its tests in `tests/unit/<plugin-name>.spec.js`.
@ -22,11 +22,11 @@ To run the unit test suite via [Karma](https://karma-runner.github.io/) and debu
- Each test should be in the corresponding `describe`.
- Each test should test only one unit per test, although one test can include several assertions. Create multiple tests for multiple units of functionality.
- Each test should use [`expect`](https://jasmine.github.io/api/edge/matchers.html) to ensure something is expected.
- Each test should follow the project's [JavaScript Code Guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#js)
- Each test should follow the projects [JavaScript Code Guidelines](https://github.com/twbs/bootstrap/blob/main/.github/CONTRIBUTING.md#js)
## Code coverage
Currently we're aiming for at least 90% test coverage for our code. To ensure your changes meet or exceed this limit, run `npm run js-test-karma` and open the file in `js/coverage/lcov-report/index.html` to see the code coverage for each plugin. See more details when you select a plugin and ensure your change is fully covered by unit tests.
Currently were aiming for at least 90% test coverage for our code. To ensure your changes meet or exceed this limit, run `npm run js-test-karma` and open the file in `js/coverage/lcov-report/index.html` to see the code coverage for each plugin. See more details when you select a plugin and ensure your change is fully covered by unit tests.
### Example tests