Skip to content
This repository was archived by the owner on Dec 19, 2024. It is now read-only.
This repository was archived by the owner on Dec 19, 2024. It is now read-only.

Iron-location prevents native hash navigation #62

@TimvdLippe

Description

@TimvdLippe

Description

Hashes can be used to point to a section with the corresponding id. E.g. if you go to mydomain.com#foo and there is a <section id="foo"> then the browser automatically scrolls to that section.

Adding app-location (and consecutively iron-location) prevents this navigation from happening.

Expected outcome

Changes to only the hash should not be intercepted.

Actual outcome

Changing the hash does not let the browser scroll to the corresponding section

Live Demo

https://jsbin.com/savejohumi/1/edit?html,console,output

Steps to reproduce

  1. Click on the link Go to Foo4
  2. Observe that the scrollbar is not altered
  3. Comment out the declaration of <iron-location>
  4. Refresh the jsbin
  5. Click on the link Go to Foo4
  6. Observe that the scrollbar is altered to the correct section

Browsers Affected

Probably all, but could verify in these browsers

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions