Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tua-body-scroll-lock

Package Overview
Dependencies
Maintainers
0
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tua-body-scroll-lock - npm Package Compare versions

Comparing version 1.5.1 to 1.5.3

6

dist/tua-bsl.esm.browser.js
/**
* tua-body-scroll-lock v1.5.1
* tua-body-scroll-lock v1.5.3
* (c) 2024 Evinma, BuptStEve

@@ -181,3 +181,3 @@ * @license MIT

toArray(targetElement)
.filter(e => lockState.lockedElements.indexOf(e) === -1)
.filter(e => e && lockState.lockedElements.indexOf(e) === -1)
.forEach((element) => {

@@ -219,3 +219,3 @@ element.ontouchstart = (event) => {

const index = lockState.lockedElements.indexOf(element);
if (index !== -1) {
if (element && index !== -1) {
element.ontouchmove = null;

@@ -222,0 +222,0 @@ element.ontouchstart = null;

/**
* tua-body-scroll-lock v1.5.1
* tua-body-scroll-lock v1.5.3
* (c) 2024 Evinma, BuptStEve
* @license MIT
*/
const e=()=>"undefined"==typeof window,t=e=>{e=e||navigator.userAgent;const t=/(iPad).*OS\s([\d_]+)/.test(e);return{ios:!t&&/(iPhone\sOS)\s([\d_]+)/.test(e)||t,android:/(Android);?[\s/]+([\d.]+)?/.test(e)}};function n(t){if(e())return!1;if(!t)throw new Error("options must be provided");let n=!1;const o={get passive(){n=!0}},i=()=>{},l="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(l,i,o),window.removeEventListener(l,i,o);const{capture:c}=t;return n?t:void 0!==c&&c}function o(){return"__BSL_PREVENT_DEFAULT__"in window||(window.__BSL_PREVENT_DEFAULT__=function(e){e.cancelable&&e.preventDefault()}),window.__BSL_PREVENT_DEFAULT__}function i(e){return e?Array.isArray(e)?e:[e]:[]}const l={lockedNum:0,lockedElements:[],unLockCallback:null,documentListenerAdded:!1,initialClientPos:{clientX:0,clientY:0}};function c(t){if(e())return l;if(!(null==t?void 0:t.useGlobalLockState))return c.lockState;const n="__BSL_LOCK_STATE__"in window?Object.assign(Object.assign({},l),window.__BSL_LOCK_STATE__):l;return window.__BSL_LOCK_STATE__=n,n}function s(l,s){if(e())return;const d=t(),r=c(s);d.ios?(i(l).filter((e=>-1===r.lockedElements.indexOf(e))).forEach((e=>{e.ontouchstart=e=>{const{clientX:t,clientY:n}=e.targetTouches[0];r.initialClientPos={clientX:t,clientY:n}},e.ontouchmove=t=>{!function(e,t,n){if(t){const{scrollTop:i,scrollLeft:l,scrollWidth:c,scrollHeight:s,clientWidth:d,clientHeight:r}=t,u=e.targetTouches[0].clientX-n.clientX,a=e.targetTouches[0].clientY-n.clientY,f=Math.abs(a)>Math.abs(u);if(f&&(a>0&&0===i||a<0&&i+r+1>=s)||!f&&(u>0&&0===l||u<0&&l+d+1>=c))return o()(e)}e.stopPropagation()}(t,e,r.initialClientPos)},r.lockedElements.push(e)})),function(e){if(!t().ios)return;if(e.documentListenerAdded)return;document.addEventListener("touchmove",o(),n({passive:!1})),e.documentListenerAdded=!0}(r)):r.lockedNum<=0&&(r.unLockCallback=d.android?function(e){const t=document.documentElement,n=document.body,o=t.scrollTop||n.scrollTop,i=Object.assign({},t.style),l=Object.assign({},n.style);return t.style.height="100%",t.style.overflow="hidden",n.style.top=`-${o}px`,n.style.width="100%",n.style.height="auto",n.style.position="fixed",n.style.overflow=(null==e?void 0:e.overflowType)||"hidden",()=>{t.style.height=i.height||"",t.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach((e=>{n.style[e]=l[e]||""})),"scrollBehavior"in document.documentElement.style?window.scrollTo({top:o,behavior:"instant"}):window.scrollTo(0,o)}}(s):function(){const e=document.documentElement,t=Object.assign({},e.style),n=window.innerWidth-e.clientWidth,o=parseInt(window.getComputedStyle(e).paddingRight,10);return e.style.overflow="hidden",e.style.boxSizing="border-box",e.style.paddingRight=`${n+o}px`,()=>{["overflow","boxSizing","paddingRight"].forEach((n=>{e.style[n]=t[n]||""}))}}()),r.lockedNum+=1}function d(t,n){if(e())return;const o=c(n);o.lockedNum-=1,o.lockedNum>0||u(o)||(i(t).forEach((e=>{const t=o.lockedElements.indexOf(e);-1!==t&&(e.ontouchmove=null,e.ontouchstart=null,o.lockedElements.splice(t,1))})),a(o))}function r(t){if(e())return;const n=c(t);if(n.lockedNum=0,!u(n)){if(n.lockedElements.length){let e=n.lockedElements.pop();for(;e;)e.ontouchmove=null,e.ontouchstart=null,e=n.lockedElements.pop()}a(n)}}function u(e){return!t().ios&&("function"==typeof e.unLockCallback&&(e.unLockCallback(),!0))}function a(e){e.documentListenerAdded&&(document.removeEventListener("touchmove",o(),n({passive:!1})),e.documentListenerAdded=!1)}c.lockState=l;export{r as clearBodyLocks,c as getLockState,s as lock,d as unlock};
const e=()=>"undefined"==typeof window,t=e=>{e=e||navigator.userAgent;const t=/(iPad).*OS\s([\d_]+)/.test(e);return{ios:!t&&/(iPhone\sOS)\s([\d_]+)/.test(e)||t,android:/(Android);?[\s/]+([\d.]+)?/.test(e)}};function n(t){if(e())return!1;if(!t)throw new Error("options must be provided");let n=!1;const o={get passive(){n=!0}},i=()=>{},l="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(l,i,o),window.removeEventListener(l,i,o);const{capture:c}=t;return n?t:void 0!==c&&c}function o(){return"__BSL_PREVENT_DEFAULT__"in window||(window.__BSL_PREVENT_DEFAULT__=function(e){e.cancelable&&e.preventDefault()}),window.__BSL_PREVENT_DEFAULT__}function i(e){return e?Array.isArray(e)?e:[e]:[]}const l={lockedNum:0,lockedElements:[],unLockCallback:null,documentListenerAdded:!1,initialClientPos:{clientX:0,clientY:0}};function c(t){if(e())return l;if(!(null==t?void 0:t.useGlobalLockState))return c.lockState;const n="__BSL_LOCK_STATE__"in window?Object.assign(Object.assign({},l),window.__BSL_LOCK_STATE__):l;return window.__BSL_LOCK_STATE__=n,n}function s(l,s){if(e())return;const d=t(),r=c(s);d.ios?(i(l).filter((e=>e&&-1===r.lockedElements.indexOf(e))).forEach((e=>{e.ontouchstart=e=>{const{clientX:t,clientY:n}=e.targetTouches[0];r.initialClientPos={clientX:t,clientY:n}},e.ontouchmove=t=>{!function(e,t,n){if(t){const{scrollTop:i,scrollLeft:l,scrollWidth:c,scrollHeight:s,clientWidth:d,clientHeight:r}=t,u=e.targetTouches[0].clientX-n.clientX,a=e.targetTouches[0].clientY-n.clientY,f=Math.abs(a)>Math.abs(u);if(f&&(a>0&&0===i||a<0&&i+r+1>=s)||!f&&(u>0&&0===l||u<0&&l+d+1>=c))return o()(e)}e.stopPropagation()}(t,e,r.initialClientPos)},r.lockedElements.push(e)})),function(e){if(!t().ios)return;if(e.documentListenerAdded)return;document.addEventListener("touchmove",o(),n({passive:!1})),e.documentListenerAdded=!0}(r)):r.lockedNum<=0&&(r.unLockCallback=d.android?function(e){const t=document.documentElement,n=document.body,o=t.scrollTop||n.scrollTop,i=Object.assign({},t.style),l=Object.assign({},n.style);return t.style.height="100%",t.style.overflow="hidden",n.style.top=`-${o}px`,n.style.width="100%",n.style.height="auto",n.style.position="fixed",n.style.overflow=(null==e?void 0:e.overflowType)||"hidden",()=>{t.style.height=i.height||"",t.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach((e=>{n.style[e]=l[e]||""})),"scrollBehavior"in document.documentElement.style?window.scrollTo({top:o,behavior:"instant"}):window.scrollTo(0,o)}}(s):function(){const e=document.documentElement,t=Object.assign({},e.style),n=window.innerWidth-e.clientWidth,o=parseInt(window.getComputedStyle(e).paddingRight,10);return e.style.overflow="hidden",e.style.boxSizing="border-box",e.style.paddingRight=`${n+o}px`,()=>{["overflow","boxSizing","paddingRight"].forEach((n=>{e.style[n]=t[n]||""}))}}()),r.lockedNum+=1}function d(t,n){if(e())return;const o=c(n);o.lockedNum-=1,o.lockedNum>0||u(o)||(i(t).forEach((e=>{const t=o.lockedElements.indexOf(e);e&&-1!==t&&(e.ontouchmove=null,e.ontouchstart=null,o.lockedElements.splice(t,1))})),a(o))}function r(t){if(e())return;const n=c(t);if(n.lockedNum=0,!u(n)){if(n.lockedElements.length){let e=n.lockedElements.pop();for(;e;)e.ontouchmove=null,e.ontouchstart=null,e=n.lockedElements.pop()}a(n)}}function u(e){return!t().ios&&("function"==typeof e.unLockCallback&&(e.unLockCallback(),!0))}function a(e){e.documentListenerAdded&&(document.removeEventListener("touchmove",o(),n({passive:!1})),e.documentListenerAdded=!1)}c.lockState=l;export{r as clearBodyLocks,c as getLockState,s as lock,d as unlock};
/**
* tua-body-scroll-lock v1.5.1
* tua-body-scroll-lock v1.5.3
* (c) 2024 Evinma, BuptStEve

@@ -184,3 +184,3 @@ * @license MIT

toArray(targetElement).filter(function (e) {
return lockState.lockedElements.indexOf(e) === -1;
return e && lockState.lockedElements.indexOf(e) === -1;
}).forEach(function (element) {

@@ -221,3 +221,3 @@ element.ontouchstart = function (event) {

var index = lockState.lockedElements.indexOf(element);
if (index !== -1) {
if (element && index !== -1) {
element.ontouchmove = null;

@@ -224,0 +224,0 @@ element.ontouchstart = null;

/**
* tua-body-scroll-lock v1.5.1
* tua-body-scroll-lock v1.5.3
* (c) 2024 Evinma, BuptStEve
* @license MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bodyScrollLock={})}(this,(function(e){"use strict";var t=function(){return"undefined"==typeof window},n=function(e){e=e||navigator.userAgent;var t=/(iPad).*OS\s([\d_]+)/.test(e);return{ios:!t&&/(iPhone\sOS)\s([\d_]+)/.test(e)||t,android:/(Android);?[\s/]+([\d.]+)?/.test(e)}};function o(e){if(t())return!1;if(!e)throw new Error("options must be provided");var n=!1,o={get passive(){n=!0}},i=function(){},l="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(l,i,o),window.removeEventListener(l,i,o);var c=e.capture;return n?e:void 0!==c&&c}function i(){return"__BSL_PREVENT_DEFAULT__"in window||(window.__BSL_PREVENT_DEFAULT__=function(e){e.cancelable&&e.preventDefault()}),window.__BSL_PREVENT_DEFAULT__}function l(e){return e?Array.isArray(e)?e:[e]:[]}var c={lockedNum:0,lockedElements:[],unLockCallback:null,documentListenerAdded:!1,initialClientPos:{clientX:0,clientY:0}};function r(e){if(t())return c;if(!(null==e?void 0:e.useGlobalLockState))return r.lockState;var n="__BSL_LOCK_STATE__"in window?Object.assign(Object.assign({},c),window.__BSL_LOCK_STATE__):c;return window.__BSL_LOCK_STATE__=n,n}function d(e){return!n().ios&&("function"==typeof e.unLockCallback&&(e.unLockCallback(),!0))}function s(e){e.documentListenerAdded&&(document.removeEventListener("touchmove",i(),o({passive:!1})),e.documentListenerAdded=!1)}r.lockState=c,e.clearBodyLocks=function(e){if(!t()){var n=r(e);if(n.lockedNum=0,!d(n)){if(n.lockedElements.length)for(var o=n.lockedElements.pop();o;)o.ontouchmove=null,o.ontouchstart=null,o=n.lockedElements.pop();s(n)}}},e.getLockState=r,e.lock=function(e,c){if(!t()){var d,s,u,a,f=n(),h=r(c);f.ios?(l(e).filter((function(e){return-1===h.lockedElements.indexOf(e)})).forEach((function(e){e.ontouchstart=function(e){var t=e.targetTouches[0],n=t.clientX,o=t.clientY;h.initialClientPos={clientX:n,clientY:o}},e.ontouchmove=function(t){!function(e,t,n){if(t){var o=t.scrollTop,l=t.scrollLeft,c=t.scrollWidth,r=t.scrollHeight,d=t.clientWidth,s=t.clientHeight,u=e.targetTouches[0].clientX-n.clientX,a=e.targetTouches[0].clientY-n.clientY,f=Math.abs(a)>Math.abs(u);if(f&&(a>0&&0===o||a<0&&o+s+1>=r)||!f&&(u>0&&0===l||u<0&&l+d+1>=c))return i()(e)}e.stopPropagation()}(t,e,h.initialClientPos)},h.lockedElements.push(e)})),function(e){if(!n().ios)return;if(e.documentListenerAdded)return;document.addEventListener("touchmove",i(),o({passive:!1})),e.documentListenerAdded=!0}(h)):h.lockedNum<=0&&(h.unLockCallback=f.android?function(e){var t=document.documentElement,n=document.body,o=t.scrollTop||n.scrollTop,i=Object.assign({},t.style),l=Object.assign({},n.style);return t.style.height="100%",t.style.overflow="hidden",n.style.top="-".concat(o,"px"),n.style.width="100%",n.style.height="auto",n.style.position="fixed",n.style.overflow=(null==e?void 0:e.overflowType)||"hidden",function(){t.style.height=i.height||"",t.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach((function(e){n.style[e]=l[e]||""})),"scrollBehavior"in document.documentElement.style?window.scrollTo({top:o,behavior:"instant"}):window.scrollTo(0,o)}}(c):(d=document.documentElement,s=Object.assign({},d.style),u=window.innerWidth-d.clientWidth,a=parseInt(window.getComputedStyle(d).paddingRight,10),d.style.overflow="hidden",d.style.boxSizing="border-box",d.style.paddingRight="".concat(u+a,"px"),function(){["overflow","boxSizing","paddingRight"].forEach((function(e){d.style[e]=s[e]||""}))})),h.lockedNum+=1}},e.unlock=function(e,n){if(!t()){var o=r(n);o.lockedNum-=1,o.lockedNum>0||d(o)||(l(e).forEach((function(e){var t=o.lockedElements.indexOf(e);-1!==t&&(e.ontouchmove=null,e.ontouchstart=null,o.lockedElements.splice(t,1))})),s(o))}}}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bodyScrollLock={})}(this,(function(e){"use strict";var t=function(){return"undefined"==typeof window},n=function(e){e=e||navigator.userAgent;var t=/(iPad).*OS\s([\d_]+)/.test(e);return{ios:!t&&/(iPhone\sOS)\s([\d_]+)/.test(e)||t,android:/(Android);?[\s/]+([\d.]+)?/.test(e)}};function o(e){if(t())return!1;if(!e)throw new Error("options must be provided");var n=!1,o={get passive(){n=!0}},i=function(){},l="__TUA_BSL_TEST_PASSIVE__";window.addEventListener(l,i,o),window.removeEventListener(l,i,o);var c=e.capture;return n?e:void 0!==c&&c}function i(){return"__BSL_PREVENT_DEFAULT__"in window||(window.__BSL_PREVENT_DEFAULT__=function(e){e.cancelable&&e.preventDefault()}),window.__BSL_PREVENT_DEFAULT__}function l(e){return e?Array.isArray(e)?e:[e]:[]}var c={lockedNum:0,lockedElements:[],unLockCallback:null,documentListenerAdded:!1,initialClientPos:{clientX:0,clientY:0}};function r(e){if(t())return c;if(!(null==e?void 0:e.useGlobalLockState))return r.lockState;var n="__BSL_LOCK_STATE__"in window?Object.assign(Object.assign({},c),window.__BSL_LOCK_STATE__):c;return window.__BSL_LOCK_STATE__=n,n}function d(e){return!n().ios&&("function"==typeof e.unLockCallback&&(e.unLockCallback(),!0))}function s(e){e.documentListenerAdded&&(document.removeEventListener("touchmove",i(),o({passive:!1})),e.documentListenerAdded=!1)}r.lockState=c,e.clearBodyLocks=function(e){if(!t()){var n=r(e);if(n.lockedNum=0,!d(n)){if(n.lockedElements.length)for(var o=n.lockedElements.pop();o;)o.ontouchmove=null,o.ontouchstart=null,o=n.lockedElements.pop();s(n)}}},e.getLockState=r,e.lock=function(e,c){if(!t()){var d,s,u,a,f=n(),h=r(c);f.ios?(l(e).filter((function(e){return e&&-1===h.lockedElements.indexOf(e)})).forEach((function(e){e.ontouchstart=function(e){var t=e.targetTouches[0],n=t.clientX,o=t.clientY;h.initialClientPos={clientX:n,clientY:o}},e.ontouchmove=function(t){!function(e,t,n){if(t){var o=t.scrollTop,l=t.scrollLeft,c=t.scrollWidth,r=t.scrollHeight,d=t.clientWidth,s=t.clientHeight,u=e.targetTouches[0].clientX-n.clientX,a=e.targetTouches[0].clientY-n.clientY,f=Math.abs(a)>Math.abs(u);if(f&&(a>0&&0===o||a<0&&o+s+1>=r)||!f&&(u>0&&0===l||u<0&&l+d+1>=c))return i()(e)}e.stopPropagation()}(t,e,h.initialClientPos)},h.lockedElements.push(e)})),function(e){if(!n().ios)return;if(e.documentListenerAdded)return;document.addEventListener("touchmove",i(),o({passive:!1})),e.documentListenerAdded=!0}(h)):h.lockedNum<=0&&(h.unLockCallback=f.android?function(e){var t=document.documentElement,n=document.body,o=t.scrollTop||n.scrollTop,i=Object.assign({},t.style),l=Object.assign({},n.style);return t.style.height="100%",t.style.overflow="hidden",n.style.top="-".concat(o,"px"),n.style.width="100%",n.style.height="auto",n.style.position="fixed",n.style.overflow=(null==e?void 0:e.overflowType)||"hidden",function(){t.style.height=i.height||"",t.style.overflow=i.overflow||"",["top","width","height","overflow","position"].forEach((function(e){n.style[e]=l[e]||""})),"scrollBehavior"in document.documentElement.style?window.scrollTo({top:o,behavior:"instant"}):window.scrollTo(0,o)}}(c):(d=document.documentElement,s=Object.assign({},d.style),u=window.innerWidth-d.clientWidth,a=parseInt(window.getComputedStyle(d).paddingRight,10),d.style.overflow="hidden",d.style.boxSizing="border-box",d.style.paddingRight="".concat(u+a,"px"),function(){["overflow","boxSizing","paddingRight"].forEach((function(e){d.style[e]=s[e]||""}))})),h.lockedNum+=1}},e.unlock=function(e,n){if(!t()){var o=r(n);o.lockedNum-=1,o.lockedNum>0||d(o)||(l(e).forEach((function(e){var t=o.lockedElements.indexOf(e);e&&-1!==t&&(e.ontouchmove=null,e.ontouchstart=null,o.lockedElements.splice(t,1))})),s(o))}}}));
{
"name": "tua-body-scroll-lock",
"version": "1.5.1",
"packageManager": "pnpm@^7",
"version": "1.5.3",
"packageManager": "pnpm@^8",
"description": "🔐Body scroll locking that just works with everything",

@@ -6,0 +6,0 @@ "main": "./dist/tua-bsl.umd.js",

@@ -8,2 +8,3 @@ # tua-body-scroll-lock

<img src="https://img.shields.io/npm/v/tua-body-scroll-lock/next.svg" alt="Next Version">
<img src="https://img.shields.io/bundlephobia/minzip/tua-body-scroll-lock" alt="npm bundle size">
<img src="https://img.shields.io/npm/l/tua-body-scroll-lock.svg" alt="License">

@@ -189,11 +190,16 @@ </a>

<table>
<tr>
<td align="center"><a href="https://github.com/evinma"><img src="https://avatars2.githubusercontent.com/u/16096567?v=4?s=100" width="100px;" alt=""/><br /><sub><b>evinma</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=evinma" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=evinma" title="Documentation">📖</a> <a href="#infra-evinma" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#translation-evinma" title="Translation">🌍</a></td>
<td align="center"><a href="https://buptsteve.github.io"><img src="https://avatars2.githubusercontent.com/u/11501493?v=4?s=100" width="100px;" alt=""/><br /><sub><b>StEve Young</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=BuptStEve" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=BuptStEve" title="Documentation">📖</a> <a href="#infra-BuptStEve" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#translation-BuptStEve" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/li2go"><img src="https://avatars2.githubusercontent.com/u/11485337?v=4?s=100" width="100px;" alt=""/><br /><sub><b>li2go</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=li2go" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3Ali2go" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/feitiange"><img src="https://avatars3.githubusercontent.com/u/7125157?v=4?s=100" width="100px;" alt=""/><br /><sub><b>songyan,Wang</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=feitiange" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3Afeitiange" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://grawl.ru/"><img src="https://avatars2.githubusercontent.com/u/846774?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Даниил Пронин</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3AGrawl" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/magic-akari"><img src="https://avatars0.githubusercontent.com/u/7829098?v=4?s=100" width="100px;" alt=""/><br /><sub><b>阿卡琳</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3Amagic-akari" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://calibur.tv"><img src="https://avatars.githubusercontent.com/u/16357724?v=4?s=100" width="100px;" alt=""/><br /><sub><b>falstack</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=falstack" title="Code">💻</a></td>
</tr>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/evinma"><img src="https://avatars2.githubusercontent.com/u/16096567?v=4?s=100" width="100px;" alt="evinma"/><br /><sub><b>evinma</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=evinma" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=evinma" title="Documentation">📖</a> <a href="#infra-evinma" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#translation-evinma" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://buptsteve.github.io"><img src="https://avatars2.githubusercontent.com/u/11501493?v=4?s=100" width="100px;" alt="StEve Young"/><br /><sub><b>StEve Young</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=BuptStEve" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=BuptStEve" title="Documentation">📖</a> <a href="#infra-BuptStEve" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#translation-BuptStEve" title="Translation">🌍</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/li2go"><img src="https://avatars2.githubusercontent.com/u/11485337?v=4?s=100" width="100px;" alt="li2go"/><br /><sub><b>li2go</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=li2go" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3Ali2go" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/feitiange"><img src="https://avatars3.githubusercontent.com/u/7125157?v=4?s=100" width="100px;" alt="songyan,Wang"/><br /><sub><b>songyan,Wang</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=feitiange" title="Code">💻</a> <a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3Afeitiange" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://grawl.ru/"><img src="https://avatars2.githubusercontent.com/u/846774?v=4?s=100" width="100px;" alt="Даниил Пронин"/><br /><sub><b>Даниил Пронин</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3AGrawl" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/magic-akari"><img src="https://avatars0.githubusercontent.com/u/7829098?v=4?s=100" width="100px;" alt="阿卡琳"/><br /><sub><b>阿卡琳</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3Amagic-akari" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://calibur.tv"><img src="https://avatars.githubusercontent.com/u/16357724?v=4?s=100" width="100px;" alt="falstack"/><br /><sub><b>falstack</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/commits?author=falstack" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hustlelikeaboss"><img src="https://avatars.githubusercontent.com/u/25436661?v=4?s=100" width="100px;" alt="David Q. Jin"/><br /><sub><b>David Q. Jin</b></sub></a><br /><a href="https://github.com/tuax/tua-body-scroll-lock/issues?q=author%3Ahustlelikeaboss" title="Bug reports">🐛</a></td>
</tr>
</tbody>
</table>

@@ -200,0 +206,0 @@

@@ -28,3 +28,3 @@ import { getLockState } from './getLockState'

toArray(targetElement)
.filter(e => lockState.lockedElements.indexOf(e) === -1)
.filter(e => e && lockState.lockedElements.indexOf(e) === -1)
.forEach((element) => {

@@ -72,3 +72,3 @@ element.ontouchstart = (event) => {

if (index !== -1) {
if (element && index !== -1) {
element.ontouchmove = null

@@ -75,0 +75,0 @@ element.ontouchstart = null

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