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

react-relative-portal

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-relative-portal - npm Package Compare versions

Comparing version 1.3.0 to 1.3.1

14

dist/RelativePortal.js

@@ -43,2 +43,9 @@ 'use strict';

function getPageOffset() {
return {
x: window.pageXOffset !== undefined ? window.pageXOffset : (document.documentElement || document.body.parentNode || document.body).scrollLeft,
y: window.pageYOffset !== undefined ? window.pageYOffset : (document.documentElement || document.body.parentNode || document.body).scrollTop
};
}
if (_exenv.canUseDOM) {

@@ -88,5 +95,6 @@ document.body.addEventListener('mousewheel', (0, _debounce2.default)(fireListeners, 100, true));

var rect = _this2.element.getBoundingClientRect();
var top = window.scrollY + rect.top;
var right = window.innerWidth - rect.right + window.scrollX;
var left = window.scrollX + rect.left;
var pageOffset = getPageOffset();
var top = pageOffset.y + rect.top;
var right = window.innerWidth - rect.right + pageOffset.x;
var left = pageOffset.x + rect.left;

@@ -93,0 +101,0 @@ if (top !== _this2.state.top || left !== _this2.state.left || right !== _this2.state.right) {

{
"name": "react-relative-portal",
"version": "1.3.0",
"version": "1.3.1",
"description": "React component for place dropdowns outside overflow: hidden; elements",

@@ -5,0 +5,0 @@ "main": "dist/RelativePortal.js",

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