react-scroll-into-view-if-needed
Advanced tools
Comparing version 2.1.2 to 2.1.3
@@ -105,7 +105,7 @@ import { createElement, createRef, PureComponent } from 'react'; | ||
if (frame === viewport) { | ||
if (targetRect.bottom > viewportHeight) { | ||
if (targetRect.bottom > viewportHeight || targetRect.top < 0) { | ||
return false; | ||
} | ||
if (targetRect.left > viewportWidth) { | ||
if (targetRect.left > viewportWidth || targetRect.right < 0) { | ||
return false; | ||
@@ -112,0 +112,0 @@ } |
@@ -110,7 +110,7 @@ (function (global, factory) { | ||
if (frame === viewport) { | ||
if (targetRect.bottom > viewportHeight) { | ||
if (targetRect.bottom > viewportHeight || targetRect.top < 0) { | ||
return false; | ||
} | ||
if (targetRect.left > viewportWidth) { | ||
if (targetRect.left > viewportWidth || targetRect.right < 0) { | ||
return false; | ||
@@ -117,0 +117,0 @@ } |
{ | ||
"name": "react-scroll-into-view-if-needed", | ||
"version": "2.1.2", | ||
"version": "2.1.3", | ||
"description": "A thin component wrapper around scroll-into-view-if-needed", | ||
@@ -38,12 +38,12 @@ "main": "dist/umd/index.js", | ||
"eslint-plugin-jsx-a11y": "^6.0.3", | ||
"eslint-plugin-react": "^7.8.2", | ||
"jest": "^23.0.1", | ||
"eslint-plugin-react": "^7.9.1", | ||
"jest": "^23.1.0", | ||
"prop-types": "^15.6.1", | ||
"react": "^16.4.0", | ||
"react-dom": "^16.4.0", | ||
"rollup": "^0.59.4", | ||
"rollup": "^0.60.1", | ||
"rollup-plugin-babel": "^3.0.4", | ||
"rollup-plugin-commonjs": "^9.1.3", | ||
"rollup-plugin-node-resolve": "^3.3.0", | ||
"scroll-into-view-if-needed": "^2.2.4" | ||
"scroll-into-view-if-needed": "^2.2.5" | ||
}, | ||
@@ -50,0 +50,0 @@ "scripts": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
534098