Fixed bug in layout when resizing window #1

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

amichair commented Feb 5, 2012

No description provided.

Owner

caphun commented Feb 13, 2012

Hey amichair: I can't seem to replicate this bug. Which browser does this happen on?

Contributor

amichair commented Feb 13, 2012

body p { margin-bottom: 0cm; margin-top: 0pt; }
I've seen it at least on Google Chrome (up to date on Ubuntu
11.10, I can check the exact Chrome version later on today if it
helps), haven't tested it on others but it might happen there too.
I have the window taking up say half the width of the screen,
scroll down until the sidebar is in 'sticky' fixed mode, then grab
the right side of the window and make it either wider or narrower.
Without the fix, the sidebar re-aligns itself incorrectly, and
remains in fixed mode but at the wrong x position (either on top
of the content in the middle of the window, or half off-screen to
the right, depending on how much wider/narrower I made it.) It
happened consistently, every time.
Let me know if you have a problem recreating, if a screenshot
will help, etc.
Amichai

On 02/13/2012 07:48 AM, Ca-Phun Ung wrote:

  Hey amichair: I can't seem to replicate this bug. Which browser does this happen on?

Reply to this email directly or view it on GitHub:
#1 (comment)

Owner

caphun commented Feb 13, 2012

I see. Thanks for your efforts on this. Does this happen with the demo.html file too? If not can you create a minimal test page for this? Thanks!

Contributor

amichair commented Feb 14, 2012

body p { margin-bottom: 0cm; margin-top: 0pt; }
It's a bit hard for me to recreate the full scenario, as the
affected website is naturally quite complex. However, a simplified
version that demonstrates something similar would be to change
demo.styles.css, setting the #main width to 50% and the .container
width to 100%. In my scenario things were a bit more jumpy, but
even in this case you can see that the sidebar is not where you'd
expect it to be after resizing the window width, until the page is
refreshed.
I suppose one might rephrase the bug as deliberating the
semantics of 'sticky' - whether it should apply only vertically or
also horizontally (which at least in this use case, causes a
visual bug). At the very least, it can be an option passed to the
plugin, if the current behavior makes sense under some other
scenario (I don't have one at the moment).
I hope this helps,
Amichai

On 02/13/2012 09:48 AM, Ca-Phun Ung wrote:

  I see. Thanks for your efforts on this. Does this happen with the demo.html file too? If not can you create a minimal test page for this? Thanks!

Reply to this email directly or view it on GitHub:
#1 (comment)

Owner

caphun commented Sep 2, 2012

I've incorporated your patch and added demo-liquid.html demonstrate the testcase. I like your natural left detection but refactored to improve the code quality and cover cases where the original position is fixed/absolute.

Thanks for the contribution!

@caphun caphun closed this Sep 2, 2012

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