rsnext/packages/next/shared/lib/router
Wouter Raateland b49717f8db
Allow scroll prevention on hash change (#31921)
* Allow scroll prevention on hash change

Currently, `scrollToHash` is performed on every hash change, even when this change is caused by `<Link scroll={false} {...props} />`.
This change prevents scrolling in this case and allows users to specify the desired scrolling behavior in the router's `hashChangeComplete` event.

* Add test case and apply fixes

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-02-06 18:38:55 -06:00
..
utils Ensure external beforeFiles rewrites are handled with next/link (#33888) 2022-02-02 18:31:56 +00:00
router.ts Allow scroll prevention on hash change (#31921) 2022-02-06 18:38:55 -06:00