Optimize default scroll behavior without scroll plugin
daun opened this issue · comments
Philipp Daun commented
Describe the problem
Currently, a default installation breaks normal scroll behavior for normal visits as well as hash changes. We're basically forcing people to install the scroll plugin.
I think we should emulate default browser behavior as much as possible by default:
- Hard-scroll to the top on page visits
- Let the browser handle hash changes normally unless the scroll plugin is installed
- Let the browser handle hash changes if the target ID is not found
Then, users can install the scroll plugin for advanced functionality, like animated scroll and remembered positions on history visits.
Describe the proposed solution
- Find a way of not
defaultPrevent
ing the click event in case it is a same-page hash change - Reset scroll top to
0
aftercontentReplaced
How important is this feature to you?
- Would make the life of newcomers a lot easier
Philipp Daun commented
Implemented in #688