🌐 AI搜索 & 代理 主页
Skip to content

Commit 6d32f22

Browse files
authored
Merge branch 'dev' into issue/4064
2 parents c1ba504 + 1eda4fe commit 6d32f22

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

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

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
isDisabled,
1313
isVisible,
1414
closest,
15+
contains,
1516
select,
1617
getById,
1718
hasClass,
@@ -211,7 +212,7 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
211212

212213
this.$nextTick(() => {
213214
const target = this.getTarget()
214-
if (target && document.contains(target)) {
215+
if (target && contains(document.body, target)) {
215216
// Copy the parent's scoped style attribute
216217
this.scopeId = getScopId(this.$parent)
217218
// Set up all trigger handlers and listeners
@@ -362,7 +363,7 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
362363

363364
if (
364365
!target ||
365-
!document.body.contains(target) ||
366+
!contains(document.body, target) ||
366367
!isVisible(target) ||
367368
this.dropdownOpen() ||
368369
((isUndefinedOrNull(this.title) || this.title === '') &&
@@ -799,13 +800,13 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
799800
/* istanbul ignore next */
800801
if (
801802
// From tip to target
802-
(tip && tip.contains(evtTarget) && target.contains(relatedTarget)) ||
803+
(tip && contains(tip, evtTarget) && contains(target, relatedTarget)) ||
803804
// From target to tip
804-
(tip && target.contains(evtTarget) && tip.contains(relatedTarget)) ||
805+
(tip && contains(target, evtTarget) && contains(tip, relatedTarget)) ||
805806
// Within tip
806-
(tip && tip.contains(evtTarget) && tip.contains(relatedTarget)) ||
807+
(tip && contains(tip, evtTarget) && contains(tip, relatedTarget)) ||
807808
// Within target
808-
(target.contains(evtTarget) && target.contains(relatedTarget))
809+
(contains(target, evtTarget) && contains(target, relatedTarget))
809810
) {
810811
// If focus/hover moves within `tip` and `target`, don't trigger a leave
811812
return

0 commit comments

Comments
 (0)