New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dreamworld/web-util

Package Overview
Dependencies
Maintainers
4
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dreamworld/web-util - npm Package Compare versions

Comparing version 1.4.3-fix-visual-viewport-issue-for-ios.6 to 1.4.3-fix-visual-viewport-issue-for-ios.7

2

package.json
{
"name": "@dreamworld/web-util",
"version": "1.4.3-fix-visual-viewport-issue-for-ios.6",
"version": "1.4.3-fix-visual-viewport-issue-for-ios.7",
"description": "",

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

@@ -12,9 +12,10 @@

const alignBottom = (scrollingElement, element, offsetBottom) => {
let scrollingElementClientHeight = window.visualViewport ? window.visualViewport.height : scrollingElement.clientHeight;
console.log("alignBottom ==> old-scrollTop", scrollingElement.scrollTop);
console.log("alignBottom ==> new-scrollTop", element.offsetTop + element.offsetHeight + offsetBottom - scrollingElement.clientHeight);
console.log("alignBottom ==> new-scrollTop", element.offsetTop + element.offsetHeight + offsetBottom - scrollingElementClientHeight);
console.log("alignBottom ==> element offsetTop", element.offsetTop);
console.log("alignBottom ==> element offsetHeight", element.offsetHeight);
console.log("alignBottom ==> offsetBottom", offsetBottom);
console.log("alignBottom ==> scrollingElement clientHeight", scrollingElement.clientHeight);
scrollingElement.scrollTop = element.offsetTop + element.offsetHeight + offsetBottom - scrollingElement.clientHeight;
console.log("alignBottom ==> scrollingElement clientHeight", scrollingElementClientHeight);
scrollingElement.scrollTop = element.offsetTop + element.offsetHeight + offsetBottom - scrollingElementClientHeight;
}

@@ -78,4 +79,5 @@

console.log("not fully visible");
let scrollingElementClientHeight = window.visualViewport ? window.visualViewport.height : scrollingElement.clientHeight;
// If element client height > view-port's height
if (element.clientHeight > (scrollingElement.clientHeight - (offsetTop + offsetBottom))) {
if (element.clientHeight > (scrollingElementClientHeight - (offsetTop + offsetBottom))) {
if (!bottom) {

@@ -97,3 +99,3 @@ console.log("align Top 1");

if((element.offsetTop + element.offsetHeight) > (scrollingElement.scrollTop + scrollingElement.clientHeight - offsetBottom)) {
if((element.offsetTop + element.offsetHeight) > (scrollingElement.scrollTop + scrollingElementClientHeight - offsetBottom)) {
console.log("align bottom 2");

@@ -100,0 +102,0 @@ alignBottom(scrollingElement, element, offsetBottom);

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