0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-11-28 10:24:19 +01:00

Merge branch 'main' into main-his-example-shortcode-without-preview

This commit is contained in:
Hannah Issermann 2024-09-13 11:51:36 +02:00 committed by GitHub
commit d7f3b165b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 6 deletions

View File

@ -160,7 +160,6 @@ class Tooltip extends BaseComponent {
return
}
this._activeTrigger.click = !this._activeTrigger.click
if (this._isShown()) {
this._leave()
return

View File

@ -56,6 +56,26 @@ describe('Popover', () => {
})
describe('show', () => {
it('should toggle a popover after show', () => {
return new Promise(resolve => {
fixtureEl.innerHTML = '<a href="#" title="Popover" data-bs-content="https://twitter.com/getbootstrap">BS twitter</a>'
const popoverEl = fixtureEl.querySelector('a')
const popover = new Popover(popoverEl)
popoverEl.addEventListener('shown.bs.popover', () => {
expect(document.querySelector('.popover')).not.toBeNull()
popover.toggle()
})
popoverEl.addEventListener('hidden.bs.popover', () => {
expect(document.querySelector('.popover')).toBeNull()
resolve()
})
popover.show()
})
})
it('should show a popover', () => {
return new Promise(resolve => {
fixtureEl.innerHTML = '<a href="#" title="Popover" data-bs-content="https://twitter.com/getbootstrap">BS twitter</a>'

8
package-lock.json generated
View File

@ -59,7 +59,7 @@
"lockfile-lint": "^4.14.0",
"nodemon": "^3.1.4",
"npm-run-all2": "^6.2.2",
"postcss": "^8.4.44",
"postcss": "^8.4.45",
"postcss-cli": "^11.0.0",
"rollup": "^4.21.2",
"rollup-plugin-istanbul": "^5.0.0",
@ -9725,9 +9725,9 @@
}
},
"node_modules/postcss": {
"version": "8.4.44",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.44.tgz",
"integrity": "sha512-Aweb9unOEpQ3ezu4Q00DPvvM2ZTUitJdNKeP/+uQgr1IBIqu574IaZoURId7BKtWMREwzKa9OgzPzezWGPWFQw==",
"version": "8.4.45",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.45.tgz",
"integrity": "sha512-7KTLTdzdZZYscUc65XmjFiB73vBhBfbPztCYdUNvlaso9PrzjzcmjqBPR0lNGkcVlcO4BjiO5rK/qNz+XAen1Q==",
"dev": true,
"funding": [
{

View File

@ -143,7 +143,7 @@
"lockfile-lint": "^4.14.0",
"nodemon": "^3.1.4",
"npm-run-all2": "^6.2.2",
"postcss": "^8.4.44",
"postcss": "^8.4.45",
"postcss-cli": "^11.0.0",
"rollup": "^4.21.2",
"rollup-plugin-istanbul": "^5.0.0",