January 26th, 2017 at 23:53 #42241
I ran into an issue where I had the perfect storm of sidebar height, content height and window height that resulted in the scroll listener not entering
if ( mainHeight <= sidebarHeight),
if ( sidebarHeight + adminbarOffset > windowHeight), or
else if ( ! top )in frontend.js. This caused the sidebar to be
position: fixedon body load, switch to
position: absolutewhen you scroll to the bottom (because it does meet the criteria
if ( $sidebar.offset().top + sidebarHeight + adminbarOffset > $footer.offset().top + 40)). After that, it never switches back to
truefrom the initial declaration.
To fix this, I added
top = false;inside of the
if ( $sidebar.offset().top + sidebarHeight + adminbarOffset > $footer.offset().top + 40)statement. This lets
if ( ! top )trigger when scrolling up and sets the sidebar back to
fixed. Hope this helps anyone with the same issue, and might be helpful to include in an update if anyone from Cryout reads this.
Website: zack.reithmeyer.comFebruary 5th, 2017 at 17:45 #42497ZedCryout Creations TeamFebruary 20th, 2017 at 14:18 #42826HarmanPower User
[This is a re-post of a reply that I seem to have deleted myself. Sorry about that!]
I’m experiencing the same issue, but it seems to occur mainly when there are widgets in the Footer area.
I’m still in the early stages of designing my new test site, and I do want to get this resolved before I make it publicly visible. I really love the look of the Verbosa theme, but this behavior makes the theme unusable. As sidebar widgets do not show in mobile view (yet), I have to use footer widgets. Also, I like the look of having a “bar” across the desktop screen at the bottom of the site, for links like About, Contact etc.
Coding is not something I’m very comfortable with, so I’m not sure how to apply thunderblaster’s tip on my site. I’m using a child theme (the NoLink child theme provided by Cryout). Where would I place a file to fix this issue, and what would it need to contain?
There is another issue that I’m experiencing, but I’m not sure if it’s related to this. When I scroll all the way down on desktop, the footer section “pushes up” the sidebar — but not entirely. The bottom bit of the sidebar stay visible “on top of” the footer. Do you have any ideas on how to fix this?
Thanks a lot!February 26th, 2017 at 19:37 #42978ZedCryout Creations TeamFebruary 26th, 2017 at 20:36 #42984HarmanPower User
Thank you, Zed!
The topic ‘Sidebar gets stuck at bottom of page’ is closed to new replies.