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

scrollPositionX is not working after a reflow() #13778

Open
mateuszkornecki opened this issue Jun 26, 2020 · 6 comments
Open

scrollPositionX is not working after a reflow() #13778

mateuszkornecki opened this issue Jun 26, 2020 · 6 comments

Comments

@mateuszkornecki
Copy link
Contributor

Expected behaviour

scrollPositionX should be respected, even after calling the chart.reflow

Actual behaviour

After calling chart.reflow with a delay chart is no longer respecting scrollPositionX property (scrollbar is no longer aligned to the right side)

Live demo with steps to reproduce

https://jsfiddle.net/BlackLabel/mwvou9sc/

Product version

8.1.2

Affected browser(s)

All

@DanLepsa
Copy link

Any updates on this? Or a workaround?

@KacperMadej
Copy link

Workaround - set the scroll position after the reflow.
Demo: https://jsfiddle.net/BlackLabel/mwvou9sc/2/

Update: the issue is still showing for v9.0.1.

@DanLepsa Please try the workaround and let us know if this works correctly for you or is there any problem with it.

@DanLepsa
Copy link

@KacperMadej Unfortunately that doesn't work in my case, as the container has 100% width. Also in your case, it seems like you can simply set the reflow prop to false.

@KacperMadej
Copy link

@DanLepsa
If you are interested in a workaround for your case please share a live demo.
I am using 100% width and the current workaround seems to be working fine for me: https://jsfiddle.net/BlackLabel/mwvou9sc/3/

Also in your case, it seems like you can simply set the reflow prop to false.

To recreate the problem? As a workaround? I have tested the chart.reflow option when set to false it only prevents auto reflow on window resize - I see no connection to the issue or the workaround.

@DanLepsa
Copy link

DanLepsa commented Feb 23, 2021

@KacperMadej As a workaround, because even in the case of a window resize the scrollPositionX would be ignored.

In my case upgrading to the latest version (9.0.1) solved the issue (as in the workaround works) 👍

@KacperMadej
Copy link

Internal note:
The scrollPosition is lost after window resize (so internal reflow) - https://jsfiddle.net/BlackLabel/mwvou9sc/4/ (try scrolling and resizing to see the scroll position jumping left at all times)

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

No branches or pull requests

3 participants