WebDevStudios / WebDevStudios/Hash-Link-Scroll-Offset

Consideration: cross page scrolling work

Open
#18 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
14
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Do we want to make this work with hashes on separate pages instead of just within the current page?

If you do decide to fix it this should do the trick on line 34:

if ( ! $( app.hash ) )

change to:

if ( ! $( app.hash ) || location.pathname.replace(/^\//,'') != this.pathname.replace(/^\//,'') )

Original request: https://wordpress.org/support/topic/breaks-between-pages-2/

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at line 34 where the hash lookup is handled, using the proposed condition as the entry point. Check the original WordPress support request for the cross-page behavior, then verify that anchored links on separate pages scroll to the target while current-page hashes continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery, php
Domain
frontend, web-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.