Skip to content

Commit ddc7246

Browse files
author
Adrian-Tudor Panescu
committed
fix issue with single-step pages (closes usablica#229)
* Fixes issue with "Done" label not shown on pages with a single data-step. Signed-off-by: Adrian-Tudor Panescu <[email protected]>
1 parent 63bc0c9 commit ddc7246

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intro.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,11 +582,11 @@
582582
_placeTooltip.call(self, targetElement.element, tooltipLayer, arrowLayer);
583583
}
584584

585-
if (this._currentStep == 0) {
585+
if (this._currentStep == 0 && this._introItems.length > 1) {
586586
prevTooltipButton.className = 'introjs-button introjs-prevbutton introjs-disabled';
587587
nextTooltipButton.className = 'introjs-button introjs-nextbutton';
588588
skipTooltipButton.innerHTML = this._options.skipLabel;
589-
} else if (this._introItems.length - 1 == this._currentStep) {
589+
} else if (this._introItems.length - 1 == this._currentStep || this._introItems.length == 1) {
590590
skipTooltipButton.innerHTML = this._options.doneLabel;
591591
prevTooltipButton.className = 'introjs-button introjs-prevbutton';
592592
nextTooltipButton.className = 'introjs-button introjs-nextbutton introjs-disabled';

0 commit comments

Comments
 (0)