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

AutoScroll Fixed Header Issue #86

Open
venkateshrajendran opened this issue Feb 25, 2020 · 10 comments
Open

AutoScroll Fixed Header Issue #86

venkateshrajendran opened this issue Feb 25, 2020 · 10 comments
Labels
02 Priority Priority: Blocker bug Something isn't working

Comments

@venkateshrajendran
Copy link

Describe the bug
My app has sticky header and due to auto scroll the highlighted part is going behind the header and highlighting also doesn't work properly. This also has some side effects as well it returns incorrect values if body elem doesn't have scroll and some custom child elem of body has scrollbar.

To Reproduce
Here is reproduction of bug. https://stackblitz.com/edit/angular-aeab5y
Note: Works fine with higher resolution and element is within view port but fails if element to be highlighted overflows beyond view port.

Expected behavior
Please find in the attached screenshot.

Screenshots
Actual Behaviour:
image

Expected Behaviour:
image

Details (please complete the following information):

  • Browser Chrome
  • List of the dependencies with their version
    Angular - 7 & 8 (tried in both versions)
    Rxjs - 6.x.x
    ngx-joyride - 2.2.10

Comments:
I have found a fix for this issue. Raising the pull request for the same, please review it.

@kanthvallampati
Copy link

I'm also facing the same issue.
@venkateshrajendran I would like to try out your solution.

@kanthvallampati
Copy link

@tnicola Do you have any plan of action for the above issue?
The solution proposed by the reporter seems fine for me. It would be great if you provide any update on this.

@tnicola
Copy link
Owner

tnicola commented Mar 15, 2020

Hi all, I'm having a look at this issue. @venkateshrajendran thanks for your PR. It seems there are some conflicts right now.

@tnicola tnicola added bug Something isn't working 02 Priority Priority: Blocker labels Mar 15, 2020
@kanthvallampati
Copy link

@tnicola Thanks for the update. A quick resolution for the issue is highly appreciated.

@kanthvallampati
Copy link

@tnicola any update on the issue ?

@vijaycreatise
Copy link

I'm also having the same problem. @venkateshrajendran can you please share the solution.

@epiphanizer
Copy link

We are also having this issue on our side. Any resolution to this?

@kanthvallampati
Copy link

Hi All,

Try the fix provided here - #87.

It worked for me. I think it works for you as well.

@kishorekumarvajravel
Copy link

Hi All,

Kindly use this for reference,

`
/**

  • @method scroll
  • @param id
    */
    scroll(id) {
    const blue = document.getElementById(id);
    let position = blue.getBoundingClientRect();
    window.scrollTo(position.left, position.top + window.scrollY - 150);
    }
    `

And use the function in the inside the step function

this.joyrideService.startTour( { steps: this.filterTourSteps, showCounter: false, stepDefaultPosition: 'bottom', themeColor: this.themeColor, showPrevButton: true, logsEnabled: false, waitingTime: 600 } ).subscribe( step => { this.scroll(step.name) }, e => { }, () => { this.doneTour(); } ); } catch (err) { } } });

It will be scrolled to the positions on the target container.

Thanks.

@cristiancajiaos
Copy link

Had this problem with an Apex similar template. @kishorekumarvajravel, it worked for me. Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02 Priority Priority: Blocker bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants