Skip to content

[bug] <rh-jump-links> Active state not consistent #2425

@alazzara

Description

@alazzara

Describe the bug

Bug Description:
The active state of rh-jump-links can get out of sync intermittently. I am not sure what causes it but I have noticed it can happen from time to time.

Steps to recreate:
Go to demo page and click around the nav items after a while it can get out of sync. Some times it happens right away. Screen recordings attached of it happening.

Screenshots

I have screen recordings if you need them. I just can't upload them here.

Steps to reproduce

For non smooth scroll example:

  1. go to the [jump-links] demo here https://ux.redhat.com/elements/jump-links/demo/nested/
  2. click around on the nav items
  3. Occasionally it will get out of sync

For smooth scroll example:

  1. go to https://www.redhat.com/en/topics/api
  2. click on a nav item that is far down the list ( > 3 away) and see how it highlights the item above the one you clicked not the one you clicked
  3. If you click it again it highlights correctly, just not on initial scroll completion

Expected behaviour

I expect the active state to match the nav item I click on.

When smooth scroll is enabled it will highlight the item above the one clicked upon scroll behavior finishing. It seems to not happen when scrolling up, just when scrolling down your nav item list.

When smooth scroll is not enabled it can get out of sync and become one click behind. For example when you click item 3 in the nav and then click item 5 instead of item 5 being highlighted item 3 is highlight and as you continue clicks it maintains being one click behind.

Element HTML

Operating System (OS)

macOS

Browser

Chrome

Additional browser or assistive technology info

mac OS

  • version 15.5

Chrome

  • Version 138.0.7204.0 (Official Build) canary (arm64)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

In Progress 🟢

Relationships

None yet

Development

No branches or pull requests

Issue actions