Skip to content

[fix] pfe-jumplinks | nav link isn't active on page load in browsers that don't support scroll behavior #1028

@kylebuch8

Description

@kylebuch8

Description of the issue

In browsers that don't support scroll behavior, basically Safari, the active menu item is not "active" on page load.

Impacted component(s)

  • pfe-jump-links

Steps to reproduce

  1. In Safari, go to https://happy-galileo-ea79c4.netlify.app/elements/pfe-jump-links/demo/#section3
  2. Notice how Section 3 is not highlighted in the side nav

Expected behavior

I'd expect Section 3 to be "active" in the nav

Screenshots

image

Developer Notes

I imagine that the _scrollCallback isn't being called on page load because the page isn't actually scrolling in Safari. https://github.com/patternfly/patternfly-elements/blob/master/elements/pfe-jump-links/src/pfe-jump-links.js#L449

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions