@kouji-ui/core 0.13.1 → 0.13.2
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.
|
@@ -1141,7 +1141,7 @@ class KjOverlayStack {
|
|
|
1141
1141
|
pressEntry = null;
|
|
1142
1142
|
register(id, opts) {
|
|
1143
1143
|
if (!this.isBrowser) {
|
|
1144
|
-
return { unregister: () => { }, isTopmost: computed(() => false), zIndex: this.configuredBase };
|
|
1144
|
+
return { unregister: () => { }, release: () => { }, isTopmost: computed(() => false), zIndex: this.configuredBase };
|
|
1145
1145
|
}
|
|
1146
1146
|
const entry = {
|
|
1147
1147
|
id,
|
|
@@ -1168,6 +1168,12 @@ class KjOverlayStack {
|
|
|
1168
1168
|
}
|
|
1169
1169
|
this.maybeRemoveListeners();
|
|
1170
1170
|
},
|
|
1171
|
+
release: () => {
|
|
1172
|
+
if (entry.opts.passive || !this._stack().includes(entry))
|
|
1173
|
+
return;
|
|
1174
|
+
entry.opts.passive = true;
|
|
1175
|
+
this._stack.update(s => [...s]);
|
|
1176
|
+
},
|
|
1171
1177
|
isTopmost,
|
|
1172
1178
|
zIndex: entry.zIndex,
|
|
1173
1179
|
};
|
|
@@ -2285,6 +2291,13 @@ class KjOverlayController {
|
|
|
2285
2291
|
beginClose() {
|
|
2286
2292
|
if (!this.strategies)
|
|
2287
2293
|
return;
|
|
2294
|
+
// A closing overlay no longer owns Escape / outside presses: one made
|
|
2295
|
+
// during its close animation belongs to what is beneath it. Released
|
|
2296
|
+
// after the current event, so the press that closed it does not also
|
|
2297
|
+
// reach the overlay beneath (its backdrop, its own Escape handler).
|
|
2298
|
+
const handle = this.stackHandle;
|
|
2299
|
+
if (handle)
|
|
2300
|
+
setTimeout(() => handle.release());
|
|
2288
2301
|
this.runTransition('close', () => this.finishClose());
|
|
2289
2302
|
}
|
|
2290
2303
|
/**
|