@signal9/era-ui 1.15.5 → 1.15.6
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/os/window.svelte +8 -5
- package/package.json +1 -1
package/dist/os/window.svelte
CHANGED
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
// (a shell has a taskbar to restore from, so no dedicated buttons). While the
|
|
16
16
|
// right button is held the glyph previews the minimize action; a left press
|
|
17
17
|
// keeps the X, so holding never implies minimize when the release will close.
|
|
18
|
+
// Like a native click, the minimize COMMITS on release, not press: right
|
|
19
|
+
// pointerdown only arms it (contextmenu is suppressed), right pointerup over
|
|
20
|
+
// the button fires it, and dragging off first cancels.
|
|
18
21
|
let minimizeHint = $state(false);
|
|
19
22
|
|
|
20
23
|
// z-index is set imperatively, NOT via a style="" prop: Pane positions itself
|
|
@@ -54,12 +57,12 @@
|
|
|
54
57
|
tone="destructive"
|
|
55
58
|
aria-label="Close (right-click to minimize)"
|
|
56
59
|
onclick={() => wm.close(win.id)}
|
|
57
|
-
oncontextmenu={(e: MouseEvent) =>
|
|
58
|
-
e.preventDefault();
|
|
59
|
-
wm.minimize(win.id);
|
|
60
|
-
}}
|
|
60
|
+
oncontextmenu={(e: MouseEvent) => e.preventDefault()}
|
|
61
61
|
onpointerdown={(e: PointerEvent) => (minimizeHint = e.button === 2)}
|
|
62
|
-
onpointerup={() =>
|
|
62
|
+
onpointerup={(e: PointerEvent) => {
|
|
63
|
+
if (e.button === 2 && minimizeHint) wm.minimize(win.id);
|
|
64
|
+
minimizeHint = false;
|
|
65
|
+
}}
|
|
63
66
|
onpointerleave={() => (minimizeHint = false)}
|
|
64
67
|
onpointercancel={() => (minimizeHint = false)}
|
|
65
68
|
>
|