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

Fix browser navigation for nav items #13

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Fix browser navigation for nav items #13

merged 1 commit into from
Jan 22, 2024

Conversation

magro
Copy link
Contributor

@magro magro commented Jan 22, 2024

This was partly broken before introducing bookmarkable urls for events, and with that got more visible. E.g. this was now unexpected behavior:

  • Open https://e4f-hamburg.de/#event-06-12-23-e4f-vernetzungstreffen
  • Close the event / modal dialog
  • Click on "Kontakt"
    • scrolls as expected, but doesn't change the url hash (bug)
  • Click browser back
    • this now opens the event / modal dialog again (unexpected - caused by the previous issue, that clicking on "Kontakt" didn't change the url

This fix is now based on
https://github.com/kswedberg/jquery-smooth-scroll?tab=readme-ov-file#fnsmoothscroll and the mentioned back button support as shown in https://github.com/kswedberg/jquery-smooth-scroll/blob/master/demo/hashchange.html

The same issue is described in
mmistakes/minimal-mistakes#1767, which is related because our agency plugin also uses smooth scrolling.

The links in organisation.md are now html links so that navigation works again.

This was partly broken before introducing bookmarkable urls for events,
and with that got more visible. E.g. this was now unexpected behavior:
* Open https://e4f-hamburg.de/#event-06-12-23-e4f-vernetzungstreffen
* Close the event / modal dialog
* Click on "Kontakt"
  * scrolls as expected, but doesn't change the url hash (bug)
* Click browser back
  * this now opens the event / modal dialog again (unexpected - caused
    by the previous issue, that clicking on "Kontakt" didn't change the
    url

This fix is now based on
https://github.com/kswedberg/jquery-smooth-scroll?tab=readme-ov-file#fnsmoothscroll
and the mentioned back button support as shown in https://github.com/kswedberg/jquery-smooth-scroll/blob/master/demo/hashchange.html

The same issue is described in
mmistakes/minimal-mistakes#1767, which is
related because our agency plugin also uses smooth scrolling.
@magro magro merged commit f21ab16 into main Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant