WordPress.org

Make WordPress Core

Opened 20 months ago

Last modified 9 months ago

#43452 new defect (bug)

Toolbar: Target for page-jump links hidden behind admin bar after a jump

Reported by: kokkieh Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Toolbar Keywords:
Focuses: Cc:
PR Number:

Description (last modified by designsimply)

Page jump links cause the target text to be hidden behind the admin bar for logged in users after clicking on the page jump link.

To replicate

  1. Create a new post/page
  2. Add some text, at least a couple pages
  3. Add an id attribute to some text that appear below the fold
  4. Add a link at the top targeting the id

(Alternatively, add some footnotes throughout the text)

  1. Publish the post, view, and click the link

What I expected

That the footnote/text with the id attribute will appear at the top of my browser, as it does when logged out:

https://cldup.com/X_8HBiRbPd.gif

What happened instead?

The next line below the targeted text appeared at the top of my browser, as the targeted line itself was behind the admin bar:

https://cldup.com/N0GhD2Gj63.gif

If the target id-attribute is added to a heading this is less noticeable - logged out there's some space between the top of the browser and the heading after the jump, but logged in the heading is flush against the admin bar. It looks like the padding-top value used on headings mitigates the effect. That padding is absent if the jump target is inline text or a footnote.

This behavior can also be observed with Continue Reading links in posts.

Possibly similar to #22520, found by @designsimply

Change History (5)

#1 follow-up: @kokkieh
20 months ago

Seems I cannot attach animated GIFs illustrating the issue. Uploaded them here instead.

#2 @designsimply
20 months ago

  • Description modified (diff)

#3 in reply to: ↑ 1 ; follow-up: @designsimply
20 months ago

Replying to kokkieh:

Seems I cannot attach animated GIFs illustrating the issue. Uploaded them here instead.

Fixed the refs in the ticket by using the full url, such as https://cldup.com/X_8HBiRbPd.gif

#4 in reply to: ↑ 3 @kokkieh
20 months ago

Replying to designsimply:

Fixed the refs in the ticket by using the full url, such as https://cldup.com/X_8HBiRbPd.gif

Thank you!

#5 @pento
9 months ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.