uiw 4.9.10 → 4.9.11

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/uiw.js CHANGED
@@ -3952,10 +3952,12 @@ var normalizeDelay = function normalizeDelay(delay) {
3952
3952
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
3953
3953
  if (isClickOutside) {
3954
3954
  document && document.addEventListener('mousedown', handleClickOutside);
3955
+ window.addEventListener('resize', handleResize);
3955
3956
  }
3956
3957
 
3957
3958
  return function () {
3958
3959
  document && isClickOutside && document.removeEventListener('mousedown', handleClickOutside);
3960
+ window.removeEventListener('resize', handleResize);
3959
3961
  };
3960
3962
  }, []);
3961
3963
  (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
@@ -3977,6 +3979,12 @@ var normalizeDelay = function normalizeDelay(delay) {
3977
3979
  onVisibleChange(isOpen);
3978
3980
  }, [isOpen]);
3979
3981
 
3982
+ var handleResize = function handleResize() {
3983
+ zIndex.current -= 1;
3984
+ setIsOpen(false);
3985
+ onVisibleChange && onVisibleChange(false);
3986
+ };
3987
+
3980
3988
  var handleClickOutside = function handleClickOutside(e) {
3981
3989
  var popNode = popupRef.current;
3982
3990
  var childNode = triggerRef.current;