@7shifts/sous-chef 3.44.4 → 3.44.6
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 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +10 -5
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6359,15 +6359,20 @@ var PaneOverlay = function PaneOverlay(_ref) {
|
|
|
6359
6359
|
position = _useState[0],
|
|
6360
6360
|
setPosition = _useState[1];
|
|
6361
6361
|
useEffect(function () {
|
|
6362
|
-
var handleScroll = function handleScroll() {
|
|
6363
|
-
|
|
6364
|
-
|
|
6362
|
+
var handleScroll = function handleScroll(e) {
|
|
6363
|
+
var _paneRef$current;
|
|
6364
|
+
if (e.target !== paneRef.current && !((_paneRef$current = paneRef.current) !== null && _paneRef$current !== void 0 && _paneRef$current.contains(e.target))) {
|
|
6365
|
+
console.log('Is not scrolling inside the pane');
|
|
6366
|
+
onToggleDropdown();
|
|
6367
|
+
} else {
|
|
6368
|
+
console.log('Is scrolling inside the pane');
|
|
6369
|
+
}
|
|
6365
6370
|
};
|
|
6366
6371
|
window.addEventListener('scroll', handleScroll, true);
|
|
6367
6372
|
return function () {
|
|
6368
|
-
window.removeEventListener('scroll', handleScroll);
|
|
6373
|
+
window.removeEventListener('scroll', handleScroll, true);
|
|
6369
6374
|
};
|
|
6370
|
-
}, [onToggleDropdown]);
|
|
6375
|
+
}, [onToggleDropdown, paneRef]);
|
|
6371
6376
|
useOnClickOutsideRole('dialog', onToggleDropdown);
|
|
6372
6377
|
useLayoutEffect(function () {
|
|
6373
6378
|
if (!triggerRef || !('current' in triggerRef) || !(triggerRef !== null && triggerRef !== void 0 && triggerRef.current) || !(paneRef !== null && paneRef !== void 0 && paneRef.current)) {
|