Intro.js: 3.1.0 don't show done/next button in only one step

Created on 4 Dec 2020  路  17Comments  路  Source: usablica/intro.js

I have tried all possible combinations of "show buttons", "nextToDone", etc ...
And when there is only one step, it does not show any type of button.

var recuerdaAgentes = introJs();
    recuerdaAgentes.setOptions({
        steps: [
        {
        element: '#agente1',
        intro: 'Sr. PRIMER APELLIDO, le recordamos que nuestro personal disponible puede <b>atenderle en vivo</b> cuando lo necesite durante el horario de atenci贸n:<br>9:00h - 19:00h'
        }
        ],
        nextLabel: 'De acuerdo, gracias',
        doneLabel: 'De acuerdo, gracias',
        overlayOpacity: .8,
        exitOnOverlayClick: false,
        exitOnEsc: false,
        keyboardNavigation: false,
        nextToDone: true,
        showButtons: true,
        showBullets: false,
        showProgress: false,
        showStepNumbers: false,
        disableInteraction: true

    });
    recuerdaAgentes.start();

HTML RESULT: https://jmp.sh/lQNnE2V
SCREEN RESULT: https://jmp.sh/vXeDyX1

bug

All 17 comments

Could you give me some kind of solution? I've had the case open for 12 days and I have no way of showing the DONE BUTTON.
Thank you.

Same problem here.
For demo you could try using this code in your console on https://introjs.com:

introJs().setOptions({
    steps: [{
        intro: "Some test message here."
    }]
}).start();

Exactly @ZsharE . Even on your website this happens.
If it is not solved soon I will have to use another type of js or downgrade to version 2.9.3.
I hope you can give us a quick solution because it worked for me with version 2.9.3, but I wanted to do an update and I changed a lot of code to adapt it to version 3.1.0. :(

https://github.com/usablica/intro.js/blob/master/src/core/showElement.js#L380

Should be: if (this._introItems.length >= 1) { ... }

Should be: if (this._introItems.length >= 1) { ... }

It works perfectly!
If the general file "intro.js" is used, the modification is made in line 2867.

Sorry about that that folks, could you please test this PR https://github.com/usablica/intro.js/pull/1118 -- happy to release a version as soon as that's approved.

cc @DigitalAndSEO and @ZsharE

there is also a Netlify dev preview https://deploy-preview-1118--introjs-repo.netlify.app/example/ for that PR

Test & Work, but now appears the back button, even if I have hidePrev: true

steps: [
        {
        element: '#agente1',
        intro: 'This is the unique step'
        }
        ],
        nextLabel: 'De acuerdo, gracias',
        doneLabel: 'De acuerdo, gracias',
        overlayOpacity: .8,
        exitOnOverlayClick: false,
        exitOnEsc: false,
        keyboardNavigation: false,
        hidePrev: true,
        nextToDone: true,
        showButtons: true,
        showBullets: false,
        showProgress: false,
        showStepNumbers: false,
        disableInteraction: true
});

Screen: https://jmp.sh/R4Bti0h

@DigitalAndSEO I'm guessing that's because you've changed "line 2867" to if (this._introItems.length >= 1) { ... }.

Should be: if (this._introItems.length >= 1) { ... }

I cannot reproduce that bug.

That's. If instead of "> =" I leave the original ">" it doesn't work, because there is only one step.

ORIGINAL 3.1.0 (don't work): if (this._introItems.length > 1) { ... }
PROPOSED (work): if (this._introItems.length >= 1) { ... }

@DigitalAndSEO not sure if I follow. if you open https://deploy-preview-1118--introjs-repo.netlify.app/example/hello-world/index.html and run the following code:

introJs().setOptions({
    steps: [{
        intro: "Some test message here."
    }]
}).start();

in your Dev console, you'll only see the "Done" button with no "Previous" button because there is only one step.

Tested, works fine now. 馃憤

Will you upload it to CDNs as a new 3.1.1 update?

Just published v3.2.0 https://github.com/usablica/intro.js/releases/tag/v3.2.0

You will also publish the changes in https://cdnjs.com/libraries/intro.js ?

CDNs are update automatically from our NPM package, see https://www.jsdelivr.com/package/npm/intro.js

not sure how long it takes to see the changes on cdnjs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  7Comments

jaesung2061 picture jaesung2061  路  9Comments

danielgolden picture danielgolden  路  7Comments

ethaniel picture ethaniel  路  6Comments

pranaysonisoft picture pranaysonisoft  路  9Comments