@coreui/react 4.9.0 → 4.9.1

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/README.md CHANGED
@@ -46,7 +46,7 @@
46
46
 
47
47
  Several quick start options are available:
48
48
 
49
- - [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.9.0.zip)
49
+ - [Download the latest release](https://github.com/coreui/coreui-react/archive/v4.9.1.zip)
50
50
  - Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
51
51
  - Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
52
52
  - Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
package/dist/index.es.js CHANGED
@@ -5983,10 +5983,12 @@ var CModal = forwardRef(function (_a, ref) {
5983
5983
  setVisible(visible);
5984
5984
  }, [visible]);
5985
5985
  useEffect(function () {
5986
- document.addEventListener('click', handleClickOutside);
5987
- document.addEventListener('keydown', handleKeyDown);
5986
+ if (_visible) {
5987
+ document.addEventListener('mouseup', handleClickOutside);
5988
+ document.addEventListener('keydown', handleKeyDown);
5989
+ }
5988
5990
  return function () {
5989
- document.removeEventListener('click', handleClickOutside);
5991
+ document.removeEventListener('mouseup', handleClickOutside);
5990
5992
  document.removeEventListener('keydown', handleKeyDown);
5991
5993
  };
5992
5994
  }, [_visible]);