Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.0 don't show done/next button in only one step #1101

Closed
DigitalAndSEO opened this issue Dec 3, 2020 · 17 comments · Fixed by #1118
Closed

3.1.0 don't show done/next button in only one step #1101

DigitalAndSEO opened this issue Dec 3, 2020 · 17 comments · Fixed by #1118
Labels

Comments

@DigitalAndSEO
Copy link

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

@DigitalAndSEO
Copy link
Author

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.

@ZsharE
Copy link

ZsharE commented Dec 15, 2020

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();

@DigitalAndSEO
Copy link
Author

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. :(

@ZsharE
Copy link

ZsharE commented Dec 15, 2020

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

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

@DigitalAndSEO
Copy link
Author

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.

@afshinm
Copy link
Contributor

afshinm commented Dec 15, 2020

Sorry about that that folks, could you please test this PR #1118 -- happy to release a version as soon as that's approved.

@afshinm afshinm added the bug label Dec 15, 2020
@afshinm
Copy link
Contributor

afshinm commented Dec 15, 2020

cc @DigitalAndSEO and @ZsharE

@afshinm
Copy link
Contributor

afshinm commented Dec 15, 2020

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

@DigitalAndSEO
Copy link
Author

DigitalAndSEO commented Dec 15, 2020

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

@afshinm
Copy link
Contributor

afshinm commented Dec 16, 2020

@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.

@DigitalAndSEO
Copy link
Author

DigitalAndSEO commented Dec 16, 2020

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) { ... }

@afshinm
Copy link
Contributor

afshinm commented Dec 16, 2020

@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.

@ZsharE
Copy link

ZsharE commented Dec 16, 2020

Tested, works fine now. 👍

@DigitalAndSEO
Copy link
Author

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

@afshinm
Copy link
Contributor

afshinm commented Dec 17, 2020

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

@DigitalAndSEO
Copy link
Author

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 ?

@afshinm
Copy link
Contributor

afshinm commented Dec 17, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants