Skip to content

Commit

Permalink
Fix: Add {left:0,top:0} as a default position for tooltips
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vladimirsiljkovic committed Dec 10, 2018
1 parent ede5ead commit f03e4b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jquery.popupoverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit f03e4b0

Please sign in to comment.