+12
-6
lines changedFilter options
+12
-6
lines changed Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ import {
12
12
isDisabled,
13
13
isVisible,
14
14
closest,
15
+
contains,
15
16
select,
16
17
getById,
17
18
hasClass,
@@ -204,7 +205,7 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
204
205
205
206
this.$nextTick(() => {
206
207
const target = this.getTarget()
207
-
if (target && document.contains(target)) {
208
+
if (target && contains(document.body, target)) {
208
209
// Copy the parent's scoped style attribute
209
210
this.scopeId = getScopId(this.$parent)
210
211
// Set up all trigger handlers and listeners
@@ -353,7 +354,12 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
353
354
// Show the tooltip
354
355
const target = this.getTarget()
355
356
356
-
if (!target || !document.body.contains(target) || !isVisible(target) || this.dropdownOpen()) {
357
+
if (
358
+
!target ||
359
+
!contains(document.body, target) ||
360
+
!isVisible(target) ||
361
+
this.dropdownOpen()
362
+
) {
357
363
// If trigger element isn't in the DOM or is not visible, or is on an open dropdown toggle
358
364
return
359
365
}
@@ -783,13 +789,13 @@ export const BVTooltip = /*#__PURE__*/ Vue.extend({
783
789
/* istanbul ignore next */
784
790
if (
785
791
// From tip to target
786
-
(tip && tip.contains(evtTarget) && target.contains(relatedTarget)) ||
792
+
(tip && contains(tip, evtTarget) && contains(target, relatedTarget)) ||
787
793
// From target to tip
788
-
(tip && target.contains(evtTarget) && tip.contains(relatedTarget)) ||
794
+
(tip && contains(target, evtTarget) && contains(tip, relatedTarget)) ||
789
795
// Within tip
790
-
(tip && tip.contains(evtTarget) && tip.contains(relatedTarget)) ||
796
+
(tip && contains(tip, evtTarget) && contains(tip, relatedTarget)) ||
791
797
// Within target
792
-
(target.contains(evtTarget) && target.contains(relatedTarget))
798
+
(contains(target, evtTarget) && contains(target, relatedTarget))
793
799
) {
794
800
// If focus/hover moves within `tip` and `target`, don't trigger a leave
795
801
return
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4