Skip to content

Commit

Permalink
fix: call _setContent after popper instance is created, closes #254
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume Chau committed Apr 28, 2019
1 parent 79a435c commit 4fd943b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/tooltip.js
Expand Up @@ -347,8 +347,6 @@ export default class Tooltip {
)
this._tooltipNode = tooltipNode

this._setContent(title, options)

// Add `aria-describedby` to our reference element for accessibility reasons
reference.setAttribute('aria-describedby', tooltipNode.id)

Expand Down Expand Up @@ -377,6 +375,8 @@ export default class Tooltip {

this.popperInstance = new Popper(reference, tooltipNode, popperOptions)

this._setContent(title, options)

// Fix position
requestAnimationFrame(() => {
if (!this._isDisposed && this.popperInstance) {
Expand Down

0 comments on commit 4fd943b

Please sign in to comment.