Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
isolate-scroll
Advanced tools
A small no-dependency Javascript lib for prevent browser to scroll parent container on wheel or touch event
Isolate Scroll is a small JavaScript library with no external dependency. Activating this library on an element, parents container will don't move when you scroll inside a child. This library prevent scroll on wheel and thouch event.
Isolate Scroll supports all browsers that are [ES5-compliant] (http://kangax.github.io/compat-table/es5/) (IE8 and below are not supported).
Isolate Scroll also prevent parent scroll in mobile browsers.
With a package manager (recomanded):
npm install isolate-scroll --save
Manually:
Download this library from https://github.com/AleeeKoi/isolate-scroll/releases
import IsolateScroll from 'isolate-scroll';
var target = '.target-element';
// or:
// var target = document.querySelector('.target-element');
var isolateScrollInstance = new IsolateScroll(target);
<script src="/path/to/isolateScroll.min.js"></script>
<script>
(function(w) {
w.addEventListener('load', function () {
var isolateScrollInstance = IsolateScroll('.container');
}, true);
})(window);
</script>
On inizialization this library caches some values, if DOM changes or is resized you need to manually call following method:
isolateScrollInstance.update();
Copyright (c) 2019-present, Alessandro Pellizzari
FAQs
A small no-dependency Javascript lib for prevent browser to scroll parent container on wheel or touch event
The npm package isolate-scroll receives a total of 13 weekly downloads. As such, isolate-scroll popularity was classified as not popular.
We found that isolate-scroll demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.