@zag-js/remove-scroll 1.14.0 → 1.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -15,8 +15,8 @@ function preventBodyScroll(_document) {
|
|
|
15
15
|
const { documentElement, body } = doc;
|
|
16
16
|
const locked = body.hasAttribute(LOCK_CLASSNAME);
|
|
17
17
|
if (locked) return;
|
|
18
|
-
body.setAttribute(LOCK_CLASSNAME, "");
|
|
19
18
|
const scrollbarWidth = win.innerWidth - documentElement.clientWidth;
|
|
19
|
+
body.setAttribute(LOCK_CLASSNAME, "");
|
|
20
20
|
const setScrollbarWidthProperty = () => domQuery.setStyleProperty(documentElement, "--scrollbar-width", `${scrollbarWidth}px`);
|
|
21
21
|
const paddingProperty = getPaddingProperty(documentElement);
|
|
22
22
|
const setBodyStyle = () => domQuery.setStyle(body, {
|
package/dist/index.mjs
CHANGED
|
@@ -13,8 +13,8 @@ function preventBodyScroll(_document) {
|
|
|
13
13
|
const { documentElement, body } = doc;
|
|
14
14
|
const locked = body.hasAttribute(LOCK_CLASSNAME);
|
|
15
15
|
if (locked) return;
|
|
16
|
-
body.setAttribute(LOCK_CLASSNAME, "");
|
|
17
16
|
const scrollbarWidth = win.innerWidth - documentElement.clientWidth;
|
|
17
|
+
body.setAttribute(LOCK_CLASSNAME, "");
|
|
18
18
|
const setScrollbarWidthProperty = () => setStyleProperty(documentElement, "--scrollbar-width", `${scrollbarWidth}px`);
|
|
19
19
|
const paddingProperty = getPaddingProperty(documentElement);
|
|
20
20
|
const setBodyStyle = () => setStyle(body, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zag-js/remove-scroll",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.1",
|
|
4
4
|
"description": "JavaScript utility to remove scroll on body",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"js",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"access": "public"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@zag-js/dom-query": "1.
|
|
22
|
+
"@zag-js/dom-query": "1.15.1"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"clean-package": "2.2.0"
|