@ioca/react 1.5.24 → 1.5.25
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/lib/es/components/popup/popup.js +5 -1
- package/lib/index.js +5 -1
- package/package.json +1 -1
|
@@ -459,7 +459,11 @@ function Popup(props) {
|
|
|
459
459
|
if (!triggerEl || !contentEl)
|
|
460
460
|
return;
|
|
461
461
|
const tar = e.target;
|
|
462
|
-
if (
|
|
462
|
+
if (contentEl.contains(tar))
|
|
463
|
+
return;
|
|
464
|
+
if (triggerEl.contains(tar) && latestRef.current.trigger !== "contextmenu")
|
|
465
|
+
return;
|
|
466
|
+
if (triggerEl.contains(tar) && e.button !== 0)
|
|
463
467
|
return;
|
|
464
468
|
doHide();
|
|
465
469
|
};
|
package/lib/index.js
CHANGED
|
@@ -2305,7 +2305,11 @@ function Popup(props) {
|
|
|
2305
2305
|
if (!triggerEl || !contentEl)
|
|
2306
2306
|
return;
|
|
2307
2307
|
const tar = e.target;
|
|
2308
|
-
if (
|
|
2308
|
+
if (contentEl.contains(tar))
|
|
2309
|
+
return;
|
|
2310
|
+
if (triggerEl.contains(tar) && latestRef.current.trigger !== "contextmenu")
|
|
2311
|
+
return;
|
|
2312
|
+
if (triggerEl.contains(tar) && e.button !== 0)
|
|
2309
2313
|
return;
|
|
2310
2314
|
doHide();
|
|
2311
2315
|
};
|