Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling links with parameter and # #54

Closed
tsharms opened this issue May 9, 2019 · 2 comments
Closed

Handling links with parameter and # #54

tsharms opened this issue May 9, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tsharms
Copy link

tsharms commented May 9, 2019

I just noticed something. I'm adding Highway to an old project where we filter news articles. The filter uses parameters and we add an anchor to scroll to the right position on the page (the filters are half way down the page). The url structure we use is: /news/?type=events#posts. But when i click on the anchor the page will hard reload instead of using the default transition. When the link is without the #posts Highway will navigate to the page with the correct animation and filter. Is it something I'm doing wrong?

@Anthodpnt
Copy link
Contributor

Hi @tsharms,

No, you are doing it right. When a URL contains an anchor on the same page, the page is hard reloaded to use the default behavior of the browser and to avoid reinventing the wheel. Does the filter work anyway?

Since we don't want to reinvent the wheel to scroll to anchors we'd prefer to keep it working as it does right now except if it breaks your filtering system. We don't want to increase the size of the library if we can rely on native browser features. Keep us in touch and don't hesitate to join our Slack to keep discussing this or other issues.

Best regards,
Anthodpnt

@Anthodpnt Anthodpnt self-assigned this May 9, 2019
@Anthodpnt Anthodpnt added the bug Something isn't working label May 9, 2019
@tsharms
Copy link
Author

tsharms commented May 9, 2019

Hi @Anthodpnt thank you for your fast response.
The filtering system is working without any problems (It's just reloading). If this is a design choice I would keep it like that. I will use Slack next time :).

Thanks!

Best regards
Tom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants