@forgeax/app-shell 0.54.0 → 0.54.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/dist/react.js +19 -2
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -1568,6 +1568,7 @@ function installOutsideDismissLifecycle(options) {
|
|
|
1568
1568
|
};
|
|
1569
1569
|
let disposed = false;
|
|
1570
1570
|
let dismissRequested = false;
|
|
1571
|
+
let rearmWhenUnpinned = false;
|
|
1571
1572
|
let frameHandle = null;
|
|
1572
1573
|
let frameGeneration = 0;
|
|
1573
1574
|
const removeListener = (target, type, listener, options2) => {
|
|
@@ -1586,14 +1587,21 @@ function installOutsideDismissLifecycle(options) {
|
|
|
1586
1587
|
}
|
|
1587
1588
|
if (!open) {
|
|
1588
1589
|
dismissRequested = false;
|
|
1590
|
+
rearmWhenUnpinned = false;
|
|
1589
1591
|
return "inactive";
|
|
1590
1592
|
}
|
|
1591
|
-
|
|
1593
|
+
let pinned;
|
|
1592
1594
|
try {
|
|
1593
|
-
|
|
1595
|
+
pinned = options.isPinned();
|
|
1594
1596
|
} catch {
|
|
1595
1597
|
return "inactive";
|
|
1596
1598
|
}
|
|
1599
|
+
if (dismissRequested) {
|
|
1600
|
+
if (!rearmWhenUnpinned || pinned) return "inactive";
|
|
1601
|
+
dismissRequested = false;
|
|
1602
|
+
rearmWhenUnpinned = false;
|
|
1603
|
+
}
|
|
1604
|
+
if (pinned) return "inactive";
|
|
1597
1605
|
if (target) {
|
|
1598
1606
|
try {
|
|
1599
1607
|
if (options.containsTarget(target)) return "contained";
|
|
@@ -1611,10 +1619,19 @@ function installOutsideDismissLifecycle(options) {
|
|
|
1611
1619
|
const requestDismiss = (reason) => {
|
|
1612
1620
|
if (dismissRequested || disposed) return;
|
|
1613
1621
|
dismissRequested = true;
|
|
1622
|
+
rearmWhenUnpinned = false;
|
|
1614
1623
|
try {
|
|
1615
1624
|
options.dismiss(reason);
|
|
1616
1625
|
} catch {
|
|
1617
1626
|
dismissRequested = false;
|
|
1627
|
+
return;
|
|
1628
|
+
}
|
|
1629
|
+
if (disposed) return;
|
|
1630
|
+
try {
|
|
1631
|
+
rearmWhenUnpinned = options.isOpen() && options.isPinned();
|
|
1632
|
+
} catch {
|
|
1633
|
+
dismissRequested = false;
|
|
1634
|
+
rearmWhenUnpinned = false;
|
|
1618
1635
|
}
|
|
1619
1636
|
};
|
|
1620
1637
|
const onPointerDown = (event) => {
|