Hi @niikk
I think this might be related to the support for sticky elements. It changed some properties for the html and body elements to allow auto-scroll scripts.
This will probably also be your issue: auto-scroll or back to top scripts.
Probably this one: https://github.com/JoryHogeveen/off-canvas-sidebars/pull/99/files#diff-1ff84c06e6ae315da118bcbad52c191d5cc893615fd3ac4312a7e7a235077284R24
Do you have a public link to the website so I can check?
Cheers, Jory
Thread Starter
niikk
(@niikk)
hello @keraweb
Thanks. Sure, The link is: https://brewmee.ch/shop/
We display the button froh the canvas sidebar only on mobile. So you have to use F12 and change to mobile view.
Cheers
Hi @niikk
When I try here I do see the header disappearing but it doesn’t scroll to top.
The disappearing of the header is because of the scroll lock. This is something I can’t fix (yet) for the legacy CSS option for left and right sidebars. Browsers seem mess up the body height when using the left
and right
css properties for animations. If you use overlay
as your animation it will work without issues.
Todo notice here: https://github.com/JoryHogeveen/off-canvas-sidebars/blob/master/js/off-canvas-sidebars.js#L476-L482
Cheers, Jory
Thread Starter
niikk
(@niikk)
hello @keraweb
When I use overlay
the automatic scroll to top after close the sidebar bug is gone. So this is now working. However, we like the push style.
But it’s strange because it worked some days ago with the push style. Do you have a idea why this is happening?
Cheers
Hi @niikk
This is most likely related to the recent update for sticky elements. The body and html styling needed a slight update for this to work.
See changes here: https://github.com/JoryHogeveen/off-canvas-sidebars/pull/99/files#diff-1ff84c06e6ae315da118bcbad52c191d5cc893615fd3ac4312a7e7a235077284
You could manually create overwrites for these changes in your theme but as I aim to make this plugin as compatible as possible there are some limitations unfortunately 🙁
I could take a look at creating snippets/compatibility code for different situations but this will get quite complex very fast.
Cheers, Jory
Thread Starter
niikk
(@niikk)
hello @keraweb
Thanks. So i’m not a professional developer. I can’t overwrite that stuff. Maybe a future update from sticky plugin can fix this?
Cheers
Hi @niikk
Found something really weird. Tested your situation locally without issues so I thought, there must be something else differently.
And there is: You’ve set a brightness filter, and it appears that for some weird reason the browser totally messed up the dimensions of the canvas when using the filter
property. If you remove it you’ll see it works correctly again.
Adding to this. Your menu and sticky panels are not fully in sync with the off-canvas animations. This made me look into the filter
attribute because I noticed the fixed elements being removed from screen once you open a off-canvas sidebar.
Cheers, Jory
Hi @urbnn
Unfortunately there isn’t a proper fix available as far as I know for the filter
attribute in this context.
I’ll need to think about how to solve this properly..
GitHub topic: https://github.com/JoryHogeveen/off-canvas-sidebars/issues/94
Cheers, Jory