From f03e4b07b396ce6eb0cf10c4fdf0f917f9630170 Mon Sep 17 00:00:00 2001 From: Vladimir Siljkovic Date: Fri, 7 Dec 2018 20:55:12 +0100 Subject: [PATCH] Fix: Add {left:0,top:0} as a default position for tooltips MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is for the case where the tooltip is opened via `show` method or `autoopen` option, and the default `openelement` doesn’t exist or is not set, and the `tooltipanchor` option is not set eigther. --- jquery.popupoverlay.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.popupoverlay.js b/jquery.popupoverlay.js index bb46a7c..b7c37a4 100644 --- a/jquery.popupoverlay.js +++ b/jquery.popupoverlay.js @@ -602,7 +602,7 @@ $tooltipanchor = $('.' + el.id + opensuffix + '[data-popup-ordinal="' + ordinal + '"]'); } - var linkOffset = $tooltipanchor.offset(); + var linkOffset = $tooltipanchor.offset() || { left: 0, top: 0 }; // Horizontal position for tooltip if (options.horizontal == 'right') {