Skip to content

Commit df00918

Browse files
aullmanAkryum
authored andcommitted
fix: tooltip in separate window (#356)
* Still close the tooltip if it is rendered in a separate window * Commit compiled changes
1 parent 59b6162 commit df00918

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

dist/v-tooltip.esm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ function () {
817817
return;
818818
}
819819

820-
if (!document.body.contains(_this9._tooltipNode)) {
820+
if (!_this9._tooltipNode.ownerDocument.body.contains(_this9._tooltipNode)) {
821821
return;
822822
} // if we are hiding because of a mouseleave, we must check that the new
823823
// reference isn't the tooltip, because in this case we don't want to hide it

dist/v-tooltip.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/v-tooltip.umd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3422,7 +3422,7 @@
34223422
return;
34233423
}
34243424

3425-
if (!document.body.contains(_this9._tooltipNode)) {
3425+
if (!_this9._tooltipNode.ownerDocument.body.contains(_this9._tooltipNode)) {
34263426
return;
34273427
} // if we are hiding because of a mouseleave, we must check that the new
34283428
// reference isn't the tooltip, because in this case we don't want to hide it

src/lib/tooltip.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ export default class Tooltip {
573573
if (this._isOpen === false) {
574574
return
575575
}
576-
if (!document.body.contains(this._tooltipNode)) {
576+
if (!this._tooltipNode.ownerDocument.body.contains(this._tooltipNode)) {
577577
return
578578
}
579579

0 commit comments

Comments
 (0)