Skip to content

Commit 8e7d381

Browse files
fix: update to released scroll-behavior API (#70)
Now that taion/scroll-behavior#306 has been merged, this updates the dependency to the released version, including using the modified API that resulted from the review feedback. Fixes #69
1 parent 6112289 commit 8e7d381

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

packages/scroll-restorer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
},
3434
"dependencies": {
3535
"@respond-framework/utils": "^0.1.1-test.1",
36-
"scroll-behavior": "git+https://github.com/hedgepigdaniel/scroll-behavior.git#build/intermediate-scroll"
36+
"scroll-behavior": "^0.9.11"
3737
},
3838
"peerDependencies": {
3939
"@respond-framework/types": "^0.1.1-test.1"

packages/scroll-restorer/src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,14 @@ export class RudyScrollRestorer<Action extends FluxStandardRoutingAction>
125125
Object.keys(this.transitionHooks).forEach((hookIndex) => {
126126
this.transitionHooks[hookIndex]()
127127
})
128+
this.behavior.startIgnoringScrollEvents()
128129
return next()
129130
}
130131
}
131132

132133
restoreScroll: Middleware<Action> = () => {
133134
return (request, next) => {
135+
this.behavior.stopIgnoringScrollEvents()
134136
this.behavior.updateScroll(null, request)
135137
return next()
136138
}

packages/types/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"prettify": "prettier --ignore-path=../../config/.prettierignore '**/*' --write"
2626
},
2727
"dependencies": {
28-
"scroll-behavior": "git+https://github.com/hedgepigdaniel/scroll-behavior.git#build/intermediate-scroll"
28+
"scroll-behavior": "^0.9.11"
2929
}
3030
}

yarn.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9356,9 +9356,10 @@ schema-utils@^2.1.0:
93569356
ajv "^6.10.2"
93579357
ajv-keywords "^3.4.1"
93589358

9359-
"scroll-behavior@git+https://github.com/hedgepigdaniel/scroll-behavior.git#build/intermediate-scroll":
9360-
version "0.9.10"
9361-
resolved "git+https://github.com/hedgepigdaniel/scroll-behavior.git#2980b68cc1658bda5923610421a12b325f28b056"
9359+
scroll-behavior@^0.9.11:
9360+
version "0.9.11"
9361+
resolved "https://registry.yarnpkg.com/scroll-behavior/-/scroll-behavior-0.9.11.tgz#f7b34380c038062bdcbd604c90e1d313220f7f3c"
9362+
integrity sha512-Eo32cg2uFiQwEiJXHHoTfXLybTlyA1O3ZOIiTz8EqRWie+ExL+7l8PcejhKT+5QmRtykXSlsTRVDC3BVB3S/bg==
93629363
dependencies:
93639364
dom-helpers "^3.4.0"
93649365
invariant "^2.2.4"

0 commit comments

Comments
 (0)