@7shifts/sous-chef 3.10.1 → 3.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +10 -1
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4381,8 +4381,9 @@ var calculateOverlayPosition$1 = function calculateOverlayPosition(triggerPositi
|
|
|
4381
4381
|
|
|
4382
4382
|
var getTopPosition = function getTopPosition(triggerPosition, triggerOffsetHeight, paneHeight) {
|
|
4383
4383
|
var top = triggerPosition.top + window.scrollY + triggerPosition.height + 3;
|
|
4384
|
+
var documentHeight = getDocumentHeight();
|
|
4384
4385
|
|
|
4385
|
-
if (top + paneHeight >
|
|
4386
|
+
if (top + paneHeight > documentHeight) {
|
|
4386
4387
|
return top - paneHeight - triggerOffsetHeight - GAP;
|
|
4387
4388
|
}
|
|
4388
4389
|
|
|
@@ -4409,6 +4410,13 @@ var getLeftAlignmentPosition = function getLeftAlignmentPosition(triggerPosition
|
|
|
4409
4410
|
return left;
|
|
4410
4411
|
};
|
|
4411
4412
|
|
|
4413
|
+
var getDocumentHeight = function getDocumentHeight() {
|
|
4414
|
+
var body = document.body;
|
|
4415
|
+
var html = document.documentElement;
|
|
4416
|
+
var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
|
|
4417
|
+
return height;
|
|
4418
|
+
};
|
|
4419
|
+
|
|
4412
4420
|
var useKeyPress = function useKeyPress(keys, onKeyPress) {
|
|
4413
4421
|
React.useEffect(function () {
|
|
4414
4422
|
var callback = function callback(event) {
|
|
@@ -4533,6 +4541,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
4533
4541
|
|
|
4534
4542
|
var handleMouseClick = function handleMouseClick(e) {
|
|
4535
4543
|
handleToggleDropdown();
|
|
4544
|
+
e.stopPropagation();
|
|
4536
4545
|
|
|
4537
4546
|
if ('onClick' in trigger.props) {
|
|
4538
4547
|
trigger.props.onClick(e);
|