diff --git a/modules/__tests__/scroll-cancellation-test.js b/modules/__tests__/scroll-cancellation-test.js
index 440cc076..6e57a633 100644
--- a/modules/__tests__/scroll-cancellation-test.js
+++ b/modules/__tests__/scroll-cancellation-test.js
@@ -23,8 +23,9 @@ describe('Scroll cancelation', () => {
const distance = 100;
class TestComponent extends React.Component {
- handleKeyDown = () => {
+ handleKeyDown = (e) => {
scroll.scrollMore(distance, { smooth: true, duration });
+ e.stopPropagation();
}
render() {
return (
@@ -65,8 +66,9 @@ describe('Scroll cancelation', () => {
const distance = 100;
class TestComponent extends React.Component {
- handleKeyDown = () => {
+ handleKeyDown = (e) => {
scroll.scrollMore(distance, { smooth: true, duration, horizontal: true });
+ e.stopPropagation();
}
render() {
return (
diff --git a/package-lock.json b/package-lock.json
index 66da2652..c1ce6b24 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "react-scroll",
- "version": "1.8.5",
+ "version": "1.8.6",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "react-scroll",
- "version": "1.8.5",
+ "version": "1.8.6",
"license": "MIT",
"dependencies": {
"lodash.throttle": "^4.1.1",
@@ -41,8 +41,8 @@
"webpack-dev-server": "^2.11.5"
},
"peerDependencies": {
- "react": "^15.5.4 || ^16.0.0 || ^17.0.0",
- "react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0"
+ "react": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0",
+ "react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0"
}
},
"node_modules/@sinonjs/commons": {
diff --git a/package.json b/package.json
index 7d8f8f8e..4c87a2c1 100644
--- a/package.json
+++ b/package.json
@@ -66,8 +66,8 @@
"webpack-dev-server": "^2.11.5"
},
"peerDependencies": {
- "react": "^15.5.4 || ^16.0.0 || ^17.0.0",
- "react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0"
+ "react": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0",
+ "react-dom": "^15.5.4 || ^16.0.0 || ^17.0.0 || ^18.0.0"
},
"babel": {
"presets": [