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

Weird rendering when the page is refreshed after the page has been scrolled to the right #42

Open
vandanagopal opened this issue Jun 17, 2016 · 4 comments

Comments

@vandanagopal
Copy link

Hi,
Am facing an issue - attached is my simple html code reproducing the problem.
When I make the screen small enough so that there is a horizontal and vertical scrollbar, and then I scroll down until I see the pane3 text and I scroll to right. Till here everything is fine. Now if I refresh the page, the pane1 text has half disappeared. If I scroll fully to the left also, that text does not reappear.
It seems to be a problem with calculating left in this line: var left = child.getBoundingClientRect().left;

Can you please take a look? Thanks.
(Note replace fixto and jquery with the right url in the attached example).

vgs.txt

@vandanagopal
Copy link
Author

I was able to repeat the same issue in your development page 1.
Make the screen small enough to get a horizontal scroll bar. scroll to the right. Then refresh the page. You can see that the pink top bar has moved to the left and we cannot get the hidden portion of the pink bar back.

@vandanagopal vandanagopal changed the title Weird rendering when the page is refreshed after the page has been scrolled to the right Weird rendering when the page is refreshed after the page has been scrolled to the right - Fix in comment. Jun 17, 2016
@vandanagopal vandanagopal changed the title Weird rendering when the page is refreshed after the page has been scrolled to the right - Fix in comment. Weird rendering when the page is refreshed after the page has been scrolled to the right Jun 17, 2016
@bbarakaci
Copy link
Owner

Hello.

Thanks for digging in. This looks like issue #12

It does not have priority but might be good to fix. I am glad you provided a solution without checking left scroll (Did you delete your comment about checking left offset?)

The only thing remaining is to add cumulative offset, as offsetparent might not be the document itself.

Will do at some point.

@vandanagopal
Copy link
Author

vandanagopal commented Jun 22, 2016

Hi, thanks for the response.
Yes I deleted my comment about left offset since I saw that it is more complicated than that. Reason is, currently I have a top bar, a left pane and a right pane. I fix the left pane and right pane, and make it "mind" the top bar. If I set the leftOffset to 0, then the right pane overwrites the left pane. Haven't been able to solve it, would greatly appreciate if you find a way to solve it.

@bbarakaci
Copy link
Owner

Unfortunately I am not having much time. I keep the horizontal scroll
issue as low priority.

On Wednesday, 22 June 2016, Vandana Gopal [email protected] wrote:

Hi, thanks for the response.
Yes I deleted my comment about left offset since I saw that it is more
complicated than that. Reason is, currently I have a top bar, a left pane
and a right pane. I fix the left pane and right pane, and make it "mind"
the top bar. If I set the leftOffset to 0, then the right pane overwrites
the left pane. So seems like the solution would be more complex. Haven't
been able to solve it, would greatly appreciate if you find a way to solve
it.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#42 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/ABtwNOVG_j5oAebJhOn4bbC2f0oy-Jphks5qOU3WgaJpZM4I4UMC
.

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