Doesn't work with same page links not starting with #

Created on 19 November 2022, about 2 years ago
Updated 20 February 2024, 10 months ago

I am using this for anchor links used in the main navigation menu for my site. The scroll works great if I just use #pictures, but several of my pages have #pictures anchors so I need to specify #pictures or /node/3#pictures, which breaks the scrolling. Even if I had unique anchors...as it's part of the menu I need to use the /node/3#pictures if I'm not on that page to begin with.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States w01f

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·France hassebasse

    Hi Ewout

    I've the same problem.

    • It works if I write #cle
    • It does not work if I write /node/31#cle

    So it is not usable for Menu links

    I have both the options "Enable scrolling for links that will trigger a page reload" and "Enable scrolling for in-page links" enabled on the settings page.

    Drupal 10.1.0 and PHP8.1

  • First commit to issue fork.
  • Hi
    I had the same problem
    Drupal 10.2 php 8.2
    I had both the options "Enable scrolling for links that will trigger a page reload" and "Enable scrolling for in-page links" enabled on the settings page however, I created a fork by adjusting the href selector and it looks fine. I have tried with #section1 and with /node/52#section1 and it worked without problems

Production build 0.71.5 2024