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:
commit
d7f3b165b3
@ -160,7 +160,6 @@ class Tooltip extends BaseComponent {
|
||||
return
|
||||
}
|
||||
|
||||
this._activeTrigger.click = !this._activeTrigger.click
|
||||
if (this._isShown()) {
|
||||
this._leave()
|
||||
return
|
||||
|
@ -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
8
package-lock.json
generated
@ -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": [
|
||||
{
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user