@therms/web-js
Advanced tools
Comparing version 2.1.1 to 2.1.2
@@ -0,1 +1,8 @@ | ||
## [2.1.2](http://bitbucket.org/thermsio/web-js/compare/v2.1.1...v2.1.2) (2022-04-19) | ||
### Bug Fixes | ||
* browser-visibility remove focus/blur events ([7577a70](http://bitbucket.org/thermsio/web-js/commits/7577a70595f8e23ce77bfe063d3e661d0e62d8bd)) | ||
## [2.1.1](http://bitbucket.org/thermsio/web-js/compare/v2.1.0...v2.1.1) (2022-04-14) | ||
@@ -2,0 +9,0 @@ |
@@ -47,14 +47,4 @@ 'use strict'; | ||
} | ||
// IE 9 and lower: | ||
if ('onfocusin' in document) { | ||
// @ts-ignore | ||
document.onfocusin = isVisible; | ||
// @ts-ignore | ||
document.onfocusout = isHidden; | ||
} | ||
// All others: | ||
window.onpageshow = window.onfocus = isVisible; | ||
window.onpagehide = window.onblur = isHidden; | ||
/** | ||
* Visibility is different than "focus"/"blur" - if the window/document is "visible" to the user or not, ie: the window | ||
* Visibility is different then "focus"/"blur" - if the window/document is "visible" to the user or not, ie: the window | ||
* is in the background on their desktop but still visible compared to the user switching to another tab. | ||
@@ -61,0 +51,0 @@ * |
export declare const checkIsBrowserVisible: () => boolean; | ||
/** | ||
* Visibility is different than "focus"/"blur" - if the window/document is "visible" to the user or not, ie: the window | ||
* Visibility is different then "focus"/"blur" - if the window/document is "visible" to the user or not, ie: the window | ||
* is in the background on their desktop but still visible compared to the user switching to another tab. | ||
@@ -5,0 +5,0 @@ * |
@@ -33,14 +33,4 @@ const checkIsBrowserVisible = () => document.visibilityState !== 'hidden'; | ||
} | ||
// IE 9 and lower: | ||
if ('onfocusin' in document) { | ||
// @ts-ignore | ||
document.onfocusin = isVisible; | ||
// @ts-ignore | ||
document.onfocusout = isHidden; | ||
} | ||
// All others: | ||
window.onpageshow = window.onfocus = isVisible; | ||
window.onpagehide = window.onblur = isHidden; | ||
/** | ||
* Visibility is different than "focus"/"blur" - if the window/document is "visible" to the user or not, ie: the window | ||
* Visibility is different then "focus"/"blur" - if the window/document is "visible" to the user or not, ie: the window | ||
* is in the background on their desktop but still visible compared to the user switching to another tab. | ||
@@ -47,0 +37,0 @@ * |
{ | ||
"name": "@therms/web-js", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "Common web/JS tools & utilities", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
98209
1464