Socket
Socket
Sign inDemoInstall

react-custom-scrollbars

Package Overview
Dependencies
51
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0 to 2.0.1

10

lib/Scrollbars.js

@@ -321,2 +321,3 @@ 'use strict';

addListeners: function addListeners() {
if (typeof document === 'undefined') return;
this.refs.view.addEventListener('scroll', this.handleScroll);

@@ -327,6 +328,7 @@ this.refs.barVertical.addEventListener('mousedown', this.handleVerticalTrackMouseDown);

this.refs.thumbHorizontal.addEventListener('mousedown', this.handleHorizontalThumbMouseDown);
if (document) document.addEventListener('mouseup', this.handleDocumentMouseUp);
if (window) window.addEventListener('resize', this.handleWindowResize);
document.addEventListener('mouseup', this.handleDocumentMouseUp);
window.addEventListener('resize', this.handleWindowResize);
},
removeListeners: function removeListeners() {
if (typeof document === 'undefined') return;
this.refs.view.removeEventListener('scroll', this.handleScroll);

@@ -337,4 +339,4 @@ this.refs.barVertical.removeEventListener('mousedown', this.handleVerticalTrackMouseDown);

this.refs.thumbHorizontal.removeEventListener('mousedown', this.handleHorizontalThumbMouseDown);
if (document) document.removeEventListener('mouseup', this.handleDocumentMouseUp);
if (window) window.removeEventListener('resize', this.handleWindowResize);
document.removeEventListener('mouseup', this.handleDocumentMouseUp);
window.removeEventListener('resize', this.handleWindowResize);
},

@@ -341,0 +343,0 @@ render: function render() {

2

lib/utils/getScrollbarWidth.js

@@ -18,3 +18,3 @@ 'use strict';

if (scrollbarWidth !== false) return scrollbarWidth;
if (document) {
if (typeof document !== 'undefined') {
var div = document.createElement('div');

@@ -21,0 +21,0 @@ (0, _domCss2.default)(div, {

{
"name": "react-custom-scrollbars",
"version": "2.0.0",
"version": "2.0.1",
"description": "React scrollbars component",

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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc