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

keep-out-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

keep-out-polyfill - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

2

dist/keep-out-polyfill.esm.js

@@ -1,1 +0,1 @@

var KeepOut=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),this.keyHeight=0,this.clientY=0,this.init()};KeepOut.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},KeepOut.prototype.initOrientation=function(){var t=this;window.addEventListener("orientationchange",function(){t.winHeight=window.innerHeight,t.navHeight=screen.availHeight-t.winHeight,t.getKeiHeight()})},KeepOut.prototype.isResize=function(){var t=window.innerHeight;return Math.abs(t-this.winHeight)>this.navHeight},KeepOut.prototype.getKeiHeight=function(){this.isKeepOut&&(this.keyHeight=screen.availHeight-window.innerHeight-50)},KeepOut.prototype.onceComput=function(){null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()),this.onceComput=function(){}},KeepOut.prototype.focusFn=function(){if((!1===this.isKeepOut||this.isbodyHide)&&this.clientY>this.keyHeight){var t=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+t+"px)"}},KeepOut.prototype.blurFn=function(){(!1===this.isKeepOut||this.isbodyHide)&&(document.body.style.transform="translateY(0px)")},KeepOut.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(t){var i=t||window.event;e.clientY=i.clientY}),window.addEventListener("keyboardFocus",function(){e.onceComput(),e.focusFn()})},KeepOut.prototype.initBlur=function(){var t=this;window.addEventListener("keyboardBlur",function(){t.blurFn()})},new KeepOut;
var KeepOut=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.keyHeight=0,this.clientY=0,this.init()};KeepOut.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},KeepOut.prototype.initOrientation=function(){var t=this;window.addEventListener("orientationchange",function(){t.winHeight=window.innerHeight,t.navHeight=screen.availHeight-t.winHeight,t.getKeiHeight()})},KeepOut.prototype.isResize=function(){var t=window.innerHeight;return Math.abs(t-this.winHeight)>this.navHeight},KeepOut.prototype.getKeiHeight=function(){this.isKeepOut&&(this.keyHeight=screen.availHeight-window.innerHeight-50)},KeepOut.prototype.onceComput=function(){null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()),this.onceComput=function(){}},KeepOut.prototype.focusFn=function(){if((!1===this.isKeepOut||this.isbodyHide)&&this.clientY>this.keyHeight){var t=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+t+"px)"}},KeepOut.prototype.blurFn=function(){(!1===this.isKeepOut||this.isbodyHide)&&(document.body.style.transform="translateY(0px)")},KeepOut.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(t){var i=t||window.event;e.clientY=i.clientY}),window.addEventListener("keyboardFocus",function(){e.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),e.onceComput(),e.focusFn()})},KeepOut.prototype.initBlur=function(){var t=this;window.addEventListener("keyboardBlur",function(){t.blurFn()})},new KeepOut;

@@ -1,1 +0,1 @@

!function(){"use strict";var t=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),this.keyHeight=0,this.clientY=0,this.init()};t.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},t.prototype.initOrientation=function(){var t=this;window.addEventListener("orientationchange",function(){t.winHeight=window.innerHeight,t.navHeight=screen.availHeight-t.winHeight,t.getKeiHeight()})},t.prototype.isResize=function(){var t=window.innerHeight;return Math.abs(t-this.winHeight)>this.navHeight},t.prototype.getKeiHeight=function(){this.isKeepOut&&(this.keyHeight=screen.availHeight-window.innerHeight-50)},t.prototype.onceComput=function(){null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()),this.onceComput=function(){}},t.prototype.focusFn=function(){if((!1===this.isKeepOut||this.isbodyHide)&&this.clientY>this.keyHeight){var t=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+t+"px)"}},t.prototype.blurFn=function(){(!1===this.isKeepOut||this.isbodyHide)&&(document.body.style.transform="translateY(0px)")},t.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(t){var i=t||window.event;e.clientY=i.clientY}),window.addEventListener("keyboardFocus",function(){e.onceComput(),e.focusFn()})},t.prototype.initBlur=function(){var t=this;window.addEventListener("keyboardBlur",function(){t.blurFn()})},new t}();
!function(){"use strict";var t=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.keyHeight=0,this.clientY=0,this.init()};t.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},t.prototype.initOrientation=function(){var t=this;window.addEventListener("orientationchange",function(){t.winHeight=window.innerHeight,t.navHeight=screen.availHeight-t.winHeight,t.getKeiHeight()})},t.prototype.isResize=function(){var t=window.innerHeight;return Math.abs(t-this.winHeight)>this.navHeight},t.prototype.getKeiHeight=function(){this.isKeepOut&&(this.keyHeight=screen.availHeight-window.innerHeight-50)},t.prototype.onceComput=function(){null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()),this.onceComput=function(){}},t.prototype.focusFn=function(){if((!1===this.isKeepOut||this.isbodyHide)&&this.clientY>this.keyHeight){var t=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+t+"px)"}},t.prototype.blurFn=function(){(!1===this.isKeepOut||this.isbodyHide)&&(document.body.style.transform="translateY(0px)")},t.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(t){var i=t||window.event;e.clientY=i.clientY}),window.addEventListener("keyboardFocus",function(){e.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),e.onceComput(),e.focusFn()})},t.prototype.initBlur=function(){var t=this;window.addEventListener("keyboardBlur",function(){t.blurFn()})},new t}();

@@ -1,1 +0,1 @@

!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){"use strict";var t=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),this.keyHeight=0,this.clientY=0,this.init()};t.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},t.prototype.initOrientation=function(){var t=this;window.addEventListener("orientationchange",function(){t.winHeight=window.innerHeight,t.navHeight=screen.availHeight-t.winHeight,t.getKeiHeight()})},t.prototype.isResize=function(){var t=window.innerHeight;return Math.abs(t-this.winHeight)>this.navHeight},t.prototype.getKeiHeight=function(){this.isKeepOut&&(this.keyHeight=screen.availHeight-window.innerHeight-50)},t.prototype.onceComput=function(){null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()),this.onceComput=function(){}},t.prototype.focusFn=function(){if((!1===this.isKeepOut||this.isbodyHide)&&this.clientY>this.keyHeight){var t=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+t+"px)"}},t.prototype.blurFn=function(){(!1===this.isKeepOut||this.isbodyHide)&&(document.body.style.transform="translateY(0px)")},t.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(t){var i=t||window.event;e.clientY=i.clientY}),window.addEventListener("keyboardFocus",function(){e.onceComput(),e.focusFn()})},t.prototype.initBlur=function(){var t=this;window.addEventListener("keyboardBlur",function(){t.blurFn()})},new t});
!function(i){"function"==typeof define&&define.amd?define(i):i()}(function(){"use strict";var i=function(){this.winHeight=window.innerHeight,this.navHeight=screen.availHeight-this.winHeight,this.isKeepOut=null,this.isbodyHide=null,this.keyHeight=0,this.clientY=0,this.init()};i.prototype.init=function(){this.initOrientation(),this.initFocus(),this.initBlur()},i.prototype.initOrientation=function(){var i=this;window.addEventListener("orientationchange",function(){i.winHeight=window.innerHeight,i.navHeight=screen.availHeight-i.winHeight,i.getKeiHeight()})},i.prototype.isResize=function(){var i=window.innerHeight;return Math.abs(i-this.winHeight)>this.navHeight},i.prototype.getKeiHeight=function(){this.isKeepOut&&(this.keyHeight=screen.availHeight-window.innerHeight-50)},i.prototype.onceComput=function(){null===this.isKeepOut&&(this.isKeepOut=this.isResize(),this.getKeiHeight()),this.onceComput=function(){}},i.prototype.focusFn=function(){if((!1===this.isKeepOut||this.isbodyHide)&&this.clientY>this.keyHeight){var i=this.clientY-this.keyHeight;document.body.style.transition="0.2s",document.body.style.transform="translateY(-"+i+"px)"}},i.prototype.blurFn=function(){(!1===this.isKeepOut||this.isbodyHide)&&(document.body.style.transform="translateY(0px)")},i.prototype.initFocus=function(){var e=this;window.addEventListener("click",function(i){var t=i||window.event;e.clientY=t.clientY}),window.addEventListener("keyboardFocus",function(){e.isbodyHide="hidden"===window.getComputedStyle(document.body,null).getPropertyValue("overflow"),e.onceComput(),e.focusFn()})},i.prototype.initBlur=function(){var i=this;window.addEventListener("keyboardBlur",function(){i.blurFn()})},new i});
{
"name": "keep-out-polyfill",
"version": "1.2.3",
"version": "1.2.4",
"main": "dist/keep-out-polyfill.umd.js",

@@ -5,0 +5,0 @@ "module": "dist/keep-out-polyfill.esm.js",

@@ -6,3 +6,3 @@ class KeepOut {

this.isKeepOut = null
this.isbodyHide = window.getComputedStyle(document.body, null).getPropertyValue("overflow") === 'hidden'
this.isbodyHide = null

@@ -72,2 +72,3 @@ this.keyHeight = 0

window.addEventListener('keyboardFocus', () => {
this.isbodyHide = window.getComputedStyle(document.body, null).getPropertyValue("overflow") === 'hidden'
this.onceComput()

@@ -74,0 +75,0 @@ this.focusFn()

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