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

Is it possible to control what element should be scrolled? #94

Open
joaorodr84 opened this issue Sep 6, 2021 · 4 comments
Open

Is it possible to control what element should be scrolled? #94

joaorodr84 opened this issue Sep 6, 2021 · 4 comments

Comments

@joaorodr84
Copy link

joaorodr84 commented Sep 6, 2021

I am using ngx-guided-tour on my Angular project. I want to have guided tour on several pages. The problem is that it only scrolls the body of the page instead of a specific div.

For example, here we have the posts freely in the body.

<h1>Hello</h1>
<button (click)="startTour()">TOUR</button>
<br /><br />
<app-post id="post1" title="Lorem Ipsum 1" body="..."></app-post>

As you can test here, navigating through the guided tour works just fine.

However, if the posts (i.e., the elements of the guided tour) are NOT directly in the body, the screen doesn't scroll.

<h1>Hello</h1>
<button (click)="startTour()">TOUR</button>
<br /><br />
<!-- Posts are inside this DIV -->
<div class="box">
  <app-post id="post1" title="Lorem Ipsum 1" body="..."></app-post>
  ...
</div>

You can test this behaviour here.

I tried using the action option to choose which element should scroll, but I wasn't able to make it work.

It seems that npx-guided-tour only scrolls the body element. Is it possible to control what element should be scrolled?

@joaorodr84
Copy link
Author

joaorodr84 commented Jan 13, 2022

Hi. I still haven't got any solution to this issue. Could anyone help, please? Thanks

@MConcoba
Copy link

@joaorodr84 I have the same problem, did you find any solution?

@joaorodr84
Copy link
Author

@MConcoba Not yet... 😕

@MConcoba
Copy link

MConcoba commented Sep 8, 2022

Hi @joaorodr84 any solution

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

2 participants