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

Possible to have backdrop constantly stay until tour end? #672

Open
claudchan opened this issue Jan 11, 2018 · 3 comments
Open

Possible to have backdrop constantly stay until tour end? #672

claudchan opened this issue Jan 11, 2018 · 3 comments

Comments

@claudchan
Copy link

Hi,
When set backdrop to true, is it possible to have backdrop constantly stay until tour end?

@memibeltrame
Copy link

+1 for this.

I solved this by having a div that covers the whole viewport and appears when the step is hidden and then goes away when the step is shown.

This is what I did:

  1. Add a div to the HTML and give it an id and the tour-backdrop class:
    <div id="backdropFallback" class="tour-backdrop "></div>

  2. Add the css to make it span over the whole viewport:
    #backdropFallback{ top:0; left:0; height: 100vh; width: 100vw; }

  3. Add the handlers that deal with showing and hiding the fallback
    onHidden: function (tour) {$("#backdropFallback").removeClass("hide");},
    onShown: function (tour) {$("#backdropFallback").addClass("hide");},
    onEnd: function (tour) {$("#backdropFallback").addClass("hide");},

Hope that helps

@omidshapouri
Copy link

On version v0.10.3, backdrop stays on page until tour ends.
But after updating to newer version like v0.12.0, backdrop hides and appears between steps which is kind of annoying for users.
I hope it gets fixed in coming update

@ajfleming1
Copy link

ajfleming1 commented Oct 5, 2018

+1 for this.

I solved this by having a div that covers the whole viewport and appears when the step is hidden and then goes away when the step is shown.

This is what I did:

  1. Add a div to the HTML and give it an id and the tour-backdrop class:
    <div id="backdropFallback" class="tour-backdrop "></div>
  2. Add the css to make it span over the whole viewport:
    #backdropFallback{ top:0; left:0; height: 100vh; width: 100vw; }
  3. Add the handlers that deal with showing and hiding the fallback
    onHidden: function (tour) {$("#backdropFallback").removeClass("hide");},
    onShown: function (tour) {$("#backdropFallback").addClass("hide");},
    onEnd: function (tour) {$("#backdropFallback").addClass("hide");},

Hope that helps

Recommend the following so it can remain hidden for the times the javascript is not loaded / properly rendered.
<div id="backdropFallback" class="tour-backdrop hide "></div>

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

No branches or pull requests

4 participants