Automattic / themes

Free WordPress themes made by Automattic for WordPress.org and WordPress.com.
https://themeshaper.com
GNU General Public License v2.0
845 stars 342 forks source link

Sticky feature not working [Bug]: #7854

Closed mosesmed closed 2 weeks ago

mosesmed commented 3 weeks ago

Quick summary

The sticky feature is not working when the group block within the header block is set to Sticky.

I've tried it with 3 themes on the Creator Plan and also the Explorer Plan. I've also used the Twenty Twenty Four theme, it didn't work.

Steps to reproduce

  1. Activate the Twenty Twenty Four theme on the Creator Plan
  2. Go to the editor and set the Group block within the header block as sticky
  3. You can replicate same issue with other themes even on the Explorer Plan.

What you expected to happen

The section set as sticky ought to remain sticky at the top of the screen.

What actually happened

The section set as sticky scrolled off the screen like normal page.

Browser

Mozilla Firefox

Context

No response

Platform (Simple, Atomic, or both?)

Simple, Atomic

Other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

None

Workaround details

No response

mosesmed commented 3 weeks ago

8312006-zen

github-actions[bot] commented 3 weeks ago

Support References

This comment is automatically generated. Please do not edit it.

coder-mahfuz commented 3 weeks ago

To make the sticky header work you will have to wrap the header element inside a group block and then set that group blocks position to sticky. Can you try the steps I have shown in this video: https://www.loom.com/share/16464cfbdff54a3caa8571c73d02efd0?sid=fa27cf78-5c04-4d37-8a17-fea7fd84afa4

mrfoxtalbot commented 2 weeks ago

What @coder-mahfuz says (thank you!)

I am going to close this but please feel free to reopen if the issue persists after adding the header template to a group and making that top-level group sticky.

Thanks @mosesmed!

mrfoxtalbot commented 2 weeks ago

To clarify further, this is indeed very confusing and needs to be fixed in core:

https://github.com/WordPress/gutenberg/issues/47043 https://github.com/WordPress/gutenberg/issues/50617 https://github.com/WordPress/gutenberg/issues/56147