Well, it's only shown if it was already open: if (this._isShown()) {
As I mentioned in the issue, in my use case it's because I want to asynchronously load in the content when the popover is opened, first displaying a loading animation and then the content.
Okay, so I replaced setContent with this in my code now:
instance.tip.querySelector('.popover-body').innerHTML = 'New Content'
instance.update()
That could be a fix in bootstrap as well, but I don't have the time right now to delve deep enough into the codebase to do a proper PR
As I mentioned in the issue, in my use case it's because I want to asynchronously load in the content when the popover is opened, first displaying a loading animation and then the content. Okay, so I replaced setContent with this in my code now:
instance.tip.querySelector('.popover-body').innerHTML = 'New Content' instance.update() That could be a fix in bootstrap as well, but I don't have the time right now to delve deep enough into the codebase to do a proper PR
Originally posted by @monsterRocky in https://github.com/twbs/bootstrap/issues/37206#issuecomment-1264692484