Skip to content

Commit 44a6cd7

Browse files
GeoSotXhmikosR
andauthored
Tooltip: remove leftover method (#35440)
Remove a leftover after #32692 Co-authored-by: XhmikosR <[email protected]>
1 parent 2fe90d8 commit 44a6cd7

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

js/src/tooltip.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -398,18 +398,6 @@ class Tooltip extends BaseComponent {
398398
return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('title')
399399
}
400400

401-
updateAttachment(attachment) {
402-
if (attachment === 'right') {
403-
return 'end'
404-
}
405-
406-
if (attachment === 'left') {
407-
return 'start'
408-
}
409-
410-
return attachment
411-
}
412-
413401
// Private
414402
_initializeOnDelegatedTarget(event, context) {
415403
return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())

js/tests/unit/tooltip.spec.js

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,40 +1083,6 @@ describe('Tooltip', () => {
10831083
})
10841084
})
10851085

1086-
describe('updateAttachment', () => {
1087-
it('should use end class name when right placement specified', done => {
1088-
fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'
1089-
1090-
const tooltipEl = fixtureEl.querySelector('a')
1091-
const tooltip = new Tooltip(tooltipEl, {
1092-
placement: 'right'
1093-
})
1094-
1095-
tooltipEl.addEventListener('inserted.bs.tooltip', () => {
1096-
expect(tooltip.getTipElement()).toHaveClass('bs-tooltip-auto')
1097-
done()
1098-
})
1099-
1100-
tooltip.show()
1101-
})
1102-
1103-
it('should use start class name when left placement specified', done => {
1104-
fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'
1105-
1106-
const tooltipEl = fixtureEl.querySelector('a')
1107-
const tooltip = new Tooltip(tooltipEl, {
1108-
placement: 'left'
1109-
})
1110-
1111-
tooltipEl.addEventListener('inserted.bs.tooltip', () => {
1112-
expect(tooltip.getTipElement()).toHaveClass('bs-tooltip-auto')
1113-
done()
1114-
})
1115-
1116-
tooltip.show()
1117-
})
1118-
})
1119-
11201086
describe('setContent', () => {
11211087
it('should do nothing if the element is null', () => {
11221088
fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'

0 commit comments

Comments
 (0)