Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
ie11-scroll-into-view
Advanced tools
Internet Explorer 11 has a bug in scrollIntoView(), which causes the whole page to move horizontally in some cases:
http://stackoverflow.com/questions/11039885/scrollintoview-causing-the-whole-page-to-move
There are various workarounds, like using jQuery, but this can be a problem when running Selenium tests, something like this:
WebElement element = driver.findElement(By.id("my-id"));
Actions actions = new Actions(driver);
actions.moveToElement(element);
actions.click();
Selenium's in-built handling of moveToElement is to use scrollIntoView().
What can be done instead, is to polyfill/fix the scrollIntoView() function itself, so that Selenium can use it.
You'll need jQuery in the project to use this polyfill. (It could probably be rewritten slightly to not use jQuery, if somebody looks into it. PRs accepted.)
npm install ie11-scroll-into-view --save
(or just download the script and put it in your project)
<script src="jquery.js"></script>
<script src="ie11-scroll-into-view.js"></script>
or with AMD:
require(['ie11-scroll-into-view'], function () {
// ...
});
or with CommonJS:
require('ie11-scroll-into-view');
or with Harmony modules:
import 'ie11-scroll-into-view';
There is currently only one test, and we run it manually:
npm run dev
This will open a server, you can access it at http://localhost:8080. You can interact with the buttons on the page to see expected behavior.
It is possible to reproduce the IE 11 bug by
commenting out the <script>
tag that imports
the polyfill/fix.
Apache 2.0
FAQs
Polyfill/fix for scrollIntoView in IE 11
The npm package ie11-scroll-into-view receives a total of 322 weekly downloads. As such, ie11-scroll-into-view popularity was classified as not popular.
We found that ie11-scroll-into-view 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.