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

scroll-into-view

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scroll-into-view - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "scroll-into-view",
"version": "1.0.5",
"version": "1.0.6",
"description": "",

@@ -5,0 +5,0 @@ "main": "scrollIntoView.js",

@@ -21,4 +21,4 @@ function setElementScroll(element, x, y){

y = targetPosition.top + window.scrollY - window.innerHeight / 2 + Math.min(targetPosition.height, window.innerHeight) / 2;
x = Math.max(Math.min(x, document.body.clientWidth - window.innerWidth), 0);
y = Math.max(Math.min(y, document.body.clientHeight - window.innerHeight), 0);
x = Math.max(Math.min(x, document.body.clientWidth - window.innerWidth / 2), 0);
y = Math.max(Math.min(y, document.body.clientHeight - window.innerHeight / 2), 0);
differenceX = x - window.scrollX;

@@ -75,3 +75,3 @@ differenceY = y - window.scrollY;

var parent = target.parentNode,
var parent = target.parentElement,
targetPosition = target.getBoundingClientRect(),

@@ -91,3 +91,3 @@ parentOverflow;

parent = parent.parentNode;
parent = parent.parentElement;
}

@@ -94,0 +94,0 @@

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