2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-17 19:21:23 +03:00

regression: fully revert attribute title existence

This commit is contained in:
GeoSot
2022-08-11 01:04:18 +03:00
parent a9d5fe2863
commit 5cc297d176
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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() {
+3 -3
View File
@@ -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()