]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Tooltip: remove leftover method (#35440)
authorGeoSot <geo.sotis@gmail.com>
Wed, 1 Dec 2021 12:53:56 +0000 (14:53 +0200)
committerGitHub <noreply@github.com>
Wed, 1 Dec 2021 12:53:56 +0000 (14:53 +0200)
Remove a leftover after #32692

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
js/src/tooltip.js
js/tests/unit/tooltip.spec.js

index 29be4d8d26ca18d53f735469f628a236fa7be95f..d0b43dd04680707c7906d633eebecd3f75d778ac 100644 (file)
@@ -398,18 +398,6 @@ class Tooltip extends BaseComponent {
     return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('title')
   }
 
-  updateAttachment(attachment) {
-    if (attachment === 'right') {
-      return 'end'
-    }
-
-    if (attachment === 'left') {
-      return 'start'
-    }
-
-    return attachment
-  }
-
   // Private
   _initializeOnDelegatedTarget(event, context) {
     return context || this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())
index 87f6c0a10acc95abe4a63a4ad48730d346d0cb31..19eeca2f52131aed381dcbd5cf815bd092677c33 100644 (file)
@@ -1083,40 +1083,6 @@ describe('Tooltip', () => {
     })
   })
 
-  describe('updateAttachment', () => {
-    it('should use end class name when right placement specified', done => {
-      fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'
-
-      const tooltipEl = fixtureEl.querySelector('a')
-      const tooltip = new Tooltip(tooltipEl, {
-        placement: 'right'
-      })
-
-      tooltipEl.addEventListener('inserted.bs.tooltip', () => {
-        expect(tooltip.getTipElement()).toHaveClass('bs-tooltip-auto')
-        done()
-      })
-
-      tooltip.show()
-    })
-
-    it('should use start class name when left placement specified', done => {
-      fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'
-
-      const tooltipEl = fixtureEl.querySelector('a')
-      const tooltip = new Tooltip(tooltipEl, {
-        placement: 'left'
-      })
-
-      tooltipEl.addEventListener('inserted.bs.tooltip', () => {
-        expect(tooltip.getTipElement()).toHaveClass('bs-tooltip-auto')
-        done()
-      })
-
-      tooltip.show()
-    })
-  })
-
   describe('setContent', () => {
     it('should do nothing if the element is null', () => {
       fixtureEl.innerHTML = '<a href="#" rel="tooltip" title="Another tooltip">'