Socket
Socket
Sign inDemoInstall

@zag-js/remove-scroll

Package Overview
Dependencies
Maintainers
1
Versions
717
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zag-js/remove-scroll - npm Package Compare versions

Comparing version 0.0.0-dev-20221229205502 to 0.0.0-dev-20230201181615

13

dist/index.js

@@ -30,5 +30,4 @@ "use strict";

function getPlatform() {
var _a;
const agent = navigator.userAgentData;
return (_a = agent == null ? void 0 : agent.platform) != null ? _a : navigator.platform;
return agent?.platform ?? navigator.platform;
}

@@ -73,5 +72,4 @@ var pt = (v) => isDom() && v.test(getPlatform());

function preventBodyScroll(_document) {
var _a;
const doc = _document != null ? _document : document;
const win = (_a = doc.defaultView) != null ? _a : window;
const doc = _document ?? document;
const win = doc.defaultView ?? window;
const { documentElement, body } = doc;

@@ -90,6 +88,5 @@ const locked = body.hasAttribute(LOCK_CLASSNAME);

const setIOSStyle = () => {
var _a2, _b;
const { scrollX, scrollY, visualViewport } = win;
const offsetLeft = (_a2 = visualViewport == null ? void 0 : visualViewport.offsetLeft) != null ? _a2 : 0;
const offsetTop = (_b = visualViewport == null ? void 0 : visualViewport.offsetTop) != null ? _b : 0;
const offsetLeft = visualViewport?.offsetLeft ?? 0;
const offsetTop = visualViewport?.offsetTop ?? 0;
const restoreStyle = assignStyle(body, {

@@ -96,0 +93,0 @@ position: "fixed",

{
"name": "@zag-js/remove-scroll",
"version": "0.0.0-dev-20221229205502",
"version": "0.0.0-dev-20230201181615",
"description": "JavaScript utility to remove scroll on body",

@@ -23,3 +23,3 @@ "keywords": [

"clean-package": "2.2.0",
"@zag-js/dom-utils": "0.0.0-dev-20221229205502"
"@zag-js/dom-utils": "0.0.0-dev-20230201181615"
},

@@ -26,0 +26,0 @@ "bugs": {

Sorry, the diff of this file is not supported yet

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