summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--css/index.css2
-rw-r--r--src/desktop/window.tsx10
2 files changed, 6 insertions, 6 deletions
diff --git a/css/index.css b/css/index.css
index 116dce1..42f817a 100644
--- a/css/index.css
+++ b/css/index.css
@@ -38,6 +38,7 @@ button {
flex-direction: column;
height: 100%;
isolation: isolate;
+ overflow: hidden;
}
@keyframes scroll {
@@ -202,7 +203,6 @@ nav > div {
flex-direction: column;
align-items: center;
border-left: 2px solid var(--red-dark);
- width: 10%;
}
.window {
diff --git a/src/desktop/window.tsx b/src/desktop/window.tsx
index a493bcf..ae91d27 100644
--- a/src/desktop/window.tsx
+++ b/src/desktop/window.tsx
@@ -16,8 +16,8 @@ export function Window(props: Window.Props) {
dragTimeout.current = setTimeout(() => {
dragging.value = false
dragTimeout.current = null;
- props.desktop.current?.removeEventListener("mousemove", onUpdatePosition)
- props.desktop.current?.removeEventListener("mouseup", stopDrag)
+ props.desktop.current?.removeEventListener("pointermove", onUpdatePosition)
+ props.desktop.current?.removeEventListener("pointerup", stopDrag)
}, 50) // intrdouce a small delay where the user can still drag the window without actually pressing down lmb to prevent accidental drops
}
}, [onUpdatePosition]);
@@ -31,9 +31,9 @@ export function Window(props: Window.Props) {
onStartDrag(e);
dragging.value = true
- props.desktop.current?.addEventListener("mousemove", onUpdatePosition)
- props.desktop.current?.addEventListener("mouseleave", stopDrag, { once: true })
- props.desktop.current?.addEventListener("mouseup", stopDrag, { once: true })
+ props.desktop.current?.addEventListener("pointermove", onUpdatePosition)
+ props.desktop.current?.addEventListener("pointerleave", stopDrag, { once: true })
+ props.desktop.current?.addEventListener("pointerup", stopDrag, { once: true })
}
}
}, [onUpdatePosition, onStartDrag, stopDrag]);