@fluentui/react-dialog
Advanced tools
Comparing version 9.11.13 to 9.11.14
@@ -24,3 +24,4 @@ "use strict"; | ||
var _targetDocument_defaultView_innerHeight; | ||
const isHorizontalScrollbarVisible = targetDocument.body.clientHeight > ((_targetDocument_defaultView_innerHeight = (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.innerHeight) !== null && _targetDocument_defaultView_innerHeight !== void 0 ? _targetDocument_defaultView_innerHeight : 0); | ||
const isHorizontalScrollbarVisible = // To properly compare the body clientHeight to the window innerHeight, manually round down the fractional value to match innerHeight's calculation. | ||
Math.floor(targetDocument.body.getBoundingClientRect().height) > ((_targetDocument_defaultView_innerHeight = (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.innerHeight) !== null && _targetDocument_defaultView_innerHeight !== void 0 ? _targetDocument_defaultView_innerHeight : 0); | ||
if (!isHorizontalScrollbarVisible) { | ||
@@ -27,0 +28,0 @@ return; |
@@ -17,3 +17,5 @@ import { useFluent_unstable } from '@fluentui/react-shared-contexts'; | ||
var _targetDocument_defaultView_innerHeight; | ||
const isHorizontalScrollbarVisible = targetDocument.body.clientHeight > ((_targetDocument_defaultView_innerHeight = (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.innerHeight) !== null && _targetDocument_defaultView_innerHeight !== void 0 ? _targetDocument_defaultView_innerHeight : 0); | ||
const isHorizontalScrollbarVisible = // When the window is a fractional height, `innerHeight` always rounds down but `clientHeight` rounds either up or down depending on the value. | ||
// To properly compare the body clientHeight to the window innerHeight, manually round down the fractional value to match innerHeight's calculation. | ||
Math.floor(targetDocument.body.getBoundingClientRect().height) > ((_targetDocument_defaultView_innerHeight = (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.innerHeight) !== null && _targetDocument_defaultView_innerHeight !== void 0 ? _targetDocument_defaultView_innerHeight : 0); | ||
if (!isHorizontalScrollbarVisible) { | ||
@@ -20,0 +22,0 @@ return; |
{ | ||
"name": "@fluentui/react-dialog", | ||
"version": "9.11.13", | ||
"version": "9.11.14", | ||
"description": "Dialog component for Fluent UI React", | ||
@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
461639
3221