Make WordPress Core

Opened 6 months ago

Closed 6 months ago

#62893 closed defect (bug) (invalid)

The "pin" header feature in the site editor is not working

Reported by: phanduynam's profile phanduynam Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.7.1
Component: Editor Keywords:
Focuses: Cc:

Description

Here is a picture of that part for easy description.
https://drive.google.com/file/d/1WDh8UkM15Rit_TrvbkPDcvxVWflWQPrH/view

Change History (3)

#1 @phanduynam
6 months ago

  • Severity changed from normal to major

#2 @hiabhaykulkarni
6 months ago

Test Report:

Issue Reproduced:

I have tested the above issue, and the position of the Group in the header is set to Sticky. However, it is not sticky on the front end.

Environment:

WordPress Version: 6.7.1
Theme Name: Twenty Twenty-Four (twentytwentyfour)
Theme Version: 1.3
OS: macOS 15.2 (24C101)
Browser: Microsoft Edge Version 132.0.2957.127 (Official build) (arm64)
Screen Recording: https://share.cleanshot.com/vyVxVZg6YY4dxg9WkDTw

#3 @poena
6 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Severity changed from major to normal
  • Status changed from new to closed

Hi @phanduynam @hiabhaykulkarni

The sticky feature uses CSS to position the block.
The position:sticky only makes an HTML element sticky inside its closest ancestor.
See https://developer.mozilla.org/en-US/docs/Web/CSS/position

In this case, because you are setting the sticky on the group that is inside the header, it is only sticky inside the header.

Please see https://learn.wordpress.org/lesson/adding-a-sticky-header-or-banner/

Because this is not a bug, but how the CSS is intended to work, I am closing this ticket.


Kindly remember that there are contributors who may not be able to see or hear video content, a text description is always needed on the tickets.
By linking to external files, there is also a risk that that file is lost over time.

Note: See TracTickets for help on using tickets.