@broberg/app-shell 0.9.0 → 0.9.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.
- package/README.md +8 -0
- package/dist/preact.cjs +1 -1
- package/dist/preact.cjs.map +1 -1
- package/dist/preact.js +1 -1
- package/dist/preact.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -53,6 +53,14 @@ the user menu reads and writes theme, palette, surfaces and backdrop through it.
|
|
|
53
53
|
| `TenantSwitcher` | The user's own organisations, the active one marked, switching through the app's route (0.7.1). |
|
|
54
54
|
| `AnalyticsPage` | The app's own visitors, page views, page views per day and most visited pages, from Upmetrics (0.6.0). |
|
|
55
55
|
|
|
56
|
+
## 0.9.2 — ConfirmDialog listens from the first frame (F092.14)
|
|
57
|
+
|
|
58
|
+
0.9.1 carried the same change but never reached npm: its publish run was stopped by a flaky test in this package (happy-dom followed an external link to the live site; now switched off). 0.9.2 is the first published version with the fix.
|
|
59
|
+
|
|
60
|
+
### What changed
|
|
61
|
+
|
|
62
|
+
Focus on Cancel and the Escape listener are now set in `useLayoutEffect`, at commit, not in `useEffect` after paint. appkit measured (Lens, real Chromium) that focus reached Cancel 153 ms after the window appeared; an Escape inside that gap went to the ⋮ trigger that still had focus and did nothing. No API change.
|
|
63
|
+
|
|
56
64
|
## 0.9.0 — ConfirmDialog: the confirm window instead of `window.confirm()` (F092.13)
|
|
57
65
|
|
|
58
66
|
Asked for by appkit for «Slet» in a `@broberg/data-table` row. No native `confirm()` or `<dialog>` (D-4cd764).
|
package/dist/preact.cjs
CHANGED
|
@@ -1465,7 +1465,7 @@ function ConfirmDialog(p) {
|
|
|
1465
1465
|
}, []);
|
|
1466
1466
|
const live = hooks.useRef(p);
|
|
1467
1467
|
live.current = p;
|
|
1468
|
-
hooks.
|
|
1468
|
+
hooks.useLayoutEffect(() => {
|
|
1469
1469
|
if (!p.open) return;
|
|
1470
1470
|
const before = document.activeElement;
|
|
1471
1471
|
cancelBtn.current?.focus();
|