Socket
Socket
Sign inDemoInstall

react-remove-scroll

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-remove-scroll - npm Package Compare versions

Comparing version 2.5.9 to 2.5.10

7

dist/es2015/handleScroll.js

@@ -6,2 +6,5 @@ var alwaysContainsScroll = function (node) {

var elementCanBeScrolled = function (node, overflow) {
if (!(node instanceof Element)) {
return false;
}
var styles = window.getComputedStyle(node);

@@ -26,4 +29,4 @@ return (

if (isScrollable) {
var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
if (s > d) {
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
if (scrollHeight > clientHeight) {
return true;

@@ -30,0 +33,0 @@ }

@@ -5,2 +5,5 @@ const alwaysContainsScroll = (node) =>

const elementCanBeScrolled = (node, overflow) => {
if (!(node instanceof Element)) {
return false;
}
const styles = window.getComputedStyle(node);

@@ -25,4 +28,4 @@ return (

if (isScrollable) {
const [, s, d] = getScrollVariables(axis, current);
if (s > d) {
const [, scrollHeight, clientHeight] = getScrollVariables(axis, current);
if (scrollHeight > clientHeight) {
return true;

@@ -29,0 +32,0 @@ }

@@ -9,2 +9,5 @@ "use strict";

var elementCanBeScrolled = function (node, overflow) {
if (!(node instanceof Element)) {
return false;
}
var styles = window.getComputedStyle(node);

@@ -29,4 +32,4 @@ return (

if (isScrollable) {
var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];
if (s > d) {
var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
if (scrollHeight > clientHeight) {
return true;

@@ -33,0 +36,0 @@ }

{
"name": "react-remove-scroll",
"version": "2.5.9",
"version": "2.5.10",
"description": "Disables scroll outside of `children` node.",

@@ -5,0 +5,0 @@ "main": "dist/es5/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc