mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-20 20:00:36 +03:00
regression: fully revert attribute title existence
This commit is contained in:
+1
-1
@@ -509,7 +509,7 @@ class Tooltip extends BaseComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._element.setAttribute('data-bs-original-title', title) // DO NOT USE IT. Is only for backwards compatibility
|
this._element.setAttribute('data-bs-original-title', title) // DO NOT USE IT. Is only for backwards compatibility
|
||||||
this._element.removeAttribute('title')
|
this._element.setAttribute('title', '')
|
||||||
}
|
}
|
||||||
|
|
||||||
_enter() {
|
_enter() {
|
||||||
|
|||||||
@@ -428,7 +428,7 @@ describe('Tooltip', () => {
|
|||||||
|
|
||||||
const tooltipWithTitleEl = fixtureEl.querySelector('#tooltipWithTitle')
|
const tooltipWithTitleEl = fixtureEl.querySelector('#tooltipWithTitle')
|
||||||
const tooltip = new Tooltip('#tooltipWithTitle')
|
const tooltip = new Tooltip('#tooltipWithTitle')
|
||||||
expect(tooltipWithTitleEl.getAttribute('title')).toBeNull()
|
expect(tooltipWithTitleEl.getAttribute('title')).toBe('')
|
||||||
tooltip.dispose()
|
tooltip.dispose()
|
||||||
expect(tooltipWithTitleEl.getAttribute('title')).toBe('tooltipTitle')
|
expect(tooltipWithTitleEl.getAttribute('title')).toBe('tooltipTitle')
|
||||||
|
|
||||||
@@ -436,7 +436,7 @@ describe('Tooltip', () => {
|
|||||||
const tooltip2 = new Tooltip('#tooltipWithTitle')
|
const tooltip2 = new Tooltip('#tooltipWithTitle')
|
||||||
expect(tooltipWithoutTitleEl.getAttribute('title')).toBeNull()
|
expect(tooltipWithoutTitleEl.getAttribute('title')).toBeNull()
|
||||||
tooltip2.dispose()
|
tooltip2.dispose()
|
||||||
expect(tooltipWithoutTitleEl.getAttribute('title')).toBeNull()
|
expect(tooltipWithoutTitleEl.getAttribute('title')).toBeNull('tooltipTitle')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -945,7 +945,7 @@ describe('Tooltip', () => {
|
|||||||
const tooltip = new Tooltip(tooltipEl)
|
const tooltip = new Tooltip(tooltipEl)
|
||||||
|
|
||||||
tooltipEl.addEventListener('shown.bs.tooltip', () => {
|
tooltipEl.addEventListener('shown.bs.tooltip', () => {
|
||||||
expect(tooltipEl.getAttribute('title')).toBeNull()
|
expect(tooltipEl.getAttribute('title')).toBe('')
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
tooltip.show()
|
tooltip.show()
|
||||||
|
|||||||
Reference in New Issue
Block a user