Skip to content

Commit e4bf592

Browse files
committed
top should stay on top
1 parent 846752a commit e4bf592

File tree

2 files changed

+30
-29
lines changed

2 files changed

+30
-29
lines changed

intro.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,11 @@
469469
windowSize = _getWinSize();
470470
switch (currentTooltipPosition) {
471471
case 'top':
472-
tooltipLayer.style.left = '15px';
473-
tooltipLayer.style.top = '-' + (tooltipOffset.height + 10) + 'px';
474472
arrowLayer.className = 'introjs-arrow bottom';
473+
474+
var tooltipLayerStyleLeft = 15;
475+
_checkRight(targetOffset, tooltipLayerStyleLeft, tooltipOffset, windowSize, tooltipLayer);
476+
tooltipLayer.style.bottom = (targetOffset.height + 20) + 'px';
475477
break;
476478
case 'right':
477479
tooltipLayer.style.left = (targetOffset.width + 20) + 'px';

0 commit comments

Comments
 (0)