Socket
Socket
Sign inDemoInstall

rc-util

Package Overview
Dependencies
8
Maintainers
9
Versions
205
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.39.0 to 5.39.1

10

es/getScrollBarSize.js

@@ -28,6 +28,10 @@ /* eslint-disable no-param-reassign */

var webkitScrollbarStyle = getComputedStyle(ele, '::-webkit-scrollbar');
var width = parseInt(webkitScrollbarStyle.width, 10);
var height = parseInt(webkitScrollbarStyle.height, 10);
// Try wrap to handle CSP case
try {
updateCSS("\n #".concat(randomId, "::-webkit-scrollbar {\n width: ").concat(webkitScrollbarStyle.width, ";\n height: ").concat(webkitScrollbarStyle.height, ";\n }\n "), randomId);
var widthStyle = width ? "width: ".concat(webkitScrollbarStyle.width, ";") : '';
var heightStyle = height ? "height: ".concat(webkitScrollbarStyle.height, ";") : '';
updateCSS("\n#".concat(randomId, "::-webkit-scrollbar {\n").concat(widthStyle, "\n").concat(heightStyle, "\n}"), randomId);
} catch (e) {

@@ -38,4 +42,4 @@ // Can't wrap, just log error

// Get from style directly
fallbackWidth = parseInt(webkitScrollbarStyle.width, 10);
fallbackHeight = parseInt(webkitScrollbarStyle.height, 10);
fallbackWidth = width;
fallbackHeight = height;
}

@@ -42,0 +46,0 @@ }

@@ -36,6 +36,10 @@ "use strict";

var webkitScrollbarStyle = getComputedStyle(ele, '::-webkit-scrollbar');
var width = parseInt(webkitScrollbarStyle.width, 10);
var height = parseInt(webkitScrollbarStyle.height, 10);
// Try wrap to handle CSP case
try {
(0, _dynamicCSS.updateCSS)("\n #".concat(randomId, "::-webkit-scrollbar {\n width: ").concat(webkitScrollbarStyle.width, ";\n height: ").concat(webkitScrollbarStyle.height, ";\n }\n "), randomId);
var widthStyle = width ? "width: ".concat(webkitScrollbarStyle.width, ";") : '';
var heightStyle = height ? "height: ".concat(webkitScrollbarStyle.height, ";") : '';
(0, _dynamicCSS.updateCSS)("\n#".concat(randomId, "::-webkit-scrollbar {\n").concat(widthStyle, "\n").concat(heightStyle, "\n}"), randomId);
} catch (e) {

@@ -46,4 +50,4 @@ // Can't wrap, just log error

// Get from style directly
fallbackWidth = parseInt(webkitScrollbarStyle.width, 10);
fallbackHeight = parseInt(webkitScrollbarStyle.height, 10);
fallbackWidth = width;
fallbackHeight = height;
}

@@ -50,0 +54,0 @@ }

{
"name": "rc-util",
"version": "5.39.0",
"version": "5.39.1",
"description": "Common Utils For React Component",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc