Skip to content

Commit 524652a

Browse files
committed
chore(compat): fetch fresh template element when checking visibility
Vue 3 and Vue 2 seems to have different order of execution, so in order to get rid of depending on it - just fetch a fresh $tip inside setInterval for visibility check
1 parent 48ec2e0 commit 524652a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/tooltip/helpers/bv-tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,9 +756,9 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
756756
visibleCheck(on) {
757757
this.clearVisibilityInterval()
758758
const target = this.getTarget()
759-
const tip = this.getTemplateElement()
760759
if (on) {
761760
this.$_visibleInterval = setInterval(() => {
761+
const tip = this.getTemplateElement()
762762
if (tip && this.localShow && (!target.parentNode || !isVisible(target))) {
763763
// Target element is no longer visible or not in DOM, so force-hide the tooltip
764764
this.forceHide()

0 commit comments

Comments
 (0)