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

@funboxteam/diamonds

Package Overview
Dependencies
Maintainers
4
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@funboxteam/diamonds - npm Package Compare versions

Comparing version 8.5.1 to 8.5.2

7

CHANGELOG.md
# Changelog
## 8.5.2 (17.09.2022)
Fixed [enableBodyScroll](./lib/body-scroll.ts) behavior while restoring the previously scrolled position.
Now it tries to ignore `scroll-behavior: smooth` on the root node, and jumps instead of smoothly scrolling.
## 8.5.1 (12.09.2022)

@@ -4,0 +11,0 @@

12

dist/cjs/body-scroll.js

@@ -12,3 +12,13 @@ "use strict";

document.body.style.marginTop = '';
window.scrollTo(window.pageXOffset, scrollTop);
window.scrollTo({
left: window.pageXOffset,
top: scrollTop,
// 'instant' is supported by Chrome and Firefox even so it was removed from the spec years ago
// also it still may be back: https://github.com/w3c/csswg-drafts/issues/3497
// it's useful here when the <html> has scroll-behavior: smooth set
// we don't want smooth scroll, we want the actual jump
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
behavior: 'instant',
});
}

@@ -15,0 +25,0 @@ }

@@ -9,3 +9,13 @@ export function enableBodyScroll() {

document.body.style.marginTop = '';
window.scrollTo(window.pageXOffset, scrollTop);
window.scrollTo({
left: window.pageXOffset,
top: scrollTop,
// 'instant' is supported by Chrome and Firefox even so it was removed from the spec years ago
// also it still may be back: https://github.com/w3c/csswg-drafts/issues/3497
// it's useful here when the <html> has scroll-behavior: smooth set
// we don't want smooth scroll, we want the actual jump
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
// @ts-ignore
behavior: 'instant',
});
}

@@ -12,0 +22,0 @@ }

2

package.json
{
"name": "@funboxteam/diamonds",
"version": "8.5.1",
"version": "8.5.2",
"description": "A shiny pile of typed JS helpers for everyday use",

@@ -5,0 +5,0 @@ "scripts": {

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