@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.modern.js
CHANGED
|
@@ -4376,8 +4376,9 @@ var calculateOverlayPosition$1 = function calculateOverlayPosition(triggerPositi
|
|
|
4376
4376
|
|
|
4377
4377
|
var getTopPosition = function getTopPosition(triggerPosition, triggerOffsetHeight, paneHeight) {
|
|
4378
4378
|
var top = triggerPosition.top + window.scrollY + triggerPosition.height + 3;
|
|
4379
|
+
var documentHeight = getDocumentHeight();
|
|
4379
4380
|
|
|
4380
|
-
if (top + paneHeight >
|
|
4381
|
+
if (top + paneHeight > documentHeight) {
|
|
4381
4382
|
return top - paneHeight - triggerOffsetHeight - GAP;
|
|
4382
4383
|
}
|
|
4383
4384
|
|
|
@@ -4404,6 +4405,13 @@ var getLeftAlignmentPosition = function getLeftAlignmentPosition(triggerPosition
|
|
|
4404
4405
|
return left;
|
|
4405
4406
|
};
|
|
4406
4407
|
|
|
4408
|
+
var getDocumentHeight = function getDocumentHeight() {
|
|
4409
|
+
var body = document.body;
|
|
4410
|
+
var html = document.documentElement;
|
|
4411
|
+
var height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);
|
|
4412
|
+
return height;
|
|
4413
|
+
};
|
|
4414
|
+
|
|
4407
4415
|
var useKeyPress = function useKeyPress(keys, onKeyPress) {
|
|
4408
4416
|
useEffect(function () {
|
|
4409
4417
|
var callback = function callback(event) {
|
|
@@ -4528,6 +4536,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
4528
4536
|
|
|
4529
4537
|
var handleMouseClick = function handleMouseClick(e) {
|
|
4530
4538
|
handleToggleDropdown();
|
|
4539
|
+
e.stopPropagation();
|
|
4531
4540
|
|
|
4532
4541
|
if ('onClick' in trigger.props) {
|
|
4533
4542
|
trigger.props.onClick(e);
|