Skip to content

Commit

Permalink
install ember-router-scroll, use window scroll position
Browse files Browse the repository at this point in the history
This installs the ember-router-scroll addon to properly remember scroll
position between routes, and to reset it when the route changes. There
was already a (copy-pasted?) config for this in the dummy app, but it
pointed to an element that doesn't exist. Instead I just removed the
config and it now uses the `window` scroll position instead, which works
well.
  • Loading branch information
bgentry committed Jul 13, 2018
1 parent 0b77cdf commit 3555204
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"ember-native-dom-helpers": "0.6.1",
"ember-radio-button": "^1.2.3",
"ember-resolver": "^4.0.0",
"ember-router-scroll": "^0.7.1",
"ember-source": "~3.1.0",
"ember-source-channel-url": "^1.0.1",
"ember-truth-helpers": "^2.0.0",
Expand Down
3 changes: 0 additions & 3 deletions tests/dummy/config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ module.exports = function(environment) {
rootURL: '/',
locationType: 'history',
historySupportMiddleware: true,
routerScroll: {
scrollElement: '#docs-viewer__scroll-body',
},
fastboot: {
hostWhitelist: [/^localhost:\d+$/],
},
Expand Down

0 comments on commit 3555204

Please sign in to comment.