Skip to content

Commit 7eff2fe

Browse files
committed
Replace ember-router-scroll with memory-scroll
The former hasn't been maintained for a couple of years, while the latter appears to be properly maintained. The behavior is ever so slightly different, but for the most part they both work roughly the same. The main purpose is to scroll the website back to the top whenever the user navigates to a new page.
1 parent cd79e7c commit 7eff2fe

File tree

3 files changed

+19
-214
lines changed

3 files changed

+19
-214
lines changed

app/templates/application.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<Header @hero={{this.isIndex}} />
1111

12-
<main local-class="main">
12+
<main local-class="main" {{remember-document-scroll key=this.router.currentURL}}>
1313
<div local-class="inner-main">
1414
{{outlet}}
1515
</div>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@
110110
"ember-page-title": "9.0.1",
111111
"ember-qunit": "9.0.2",
112112
"ember-resolver": "13.1.0",
113-
"ember-router-scroll": "4.1.2",
114113
"ember-source": "6.0.1",
115114
"ember-svg-jar": "2.6.2",
116115
"ember-template-lint": "7.0.4",
@@ -131,6 +130,7 @@
131130
"globby": "14.1.0",
132131
"loader.js": "4.7.0",
133132
"match-json": "1.3.7",
133+
"memory-scroll": "2.0.1",
134134
"msw": "2.7.3",
135135
"normalize.css": "8.0.1",
136136
"nyc": "17.1.0",

0 commit comments

Comments
 (0)