Skip to content

Commit 0608b2f

Browse files
committed
Fix marquee dragging
1 parent 27ba138 commit 0608b2f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

packages/webamp-docs/docs/12_changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ If you want access to the changes in this section before they are officially rel
1212

1313
- Added new [`requireButterchurnPresets`](./06_API/02_webamp-constructor.md#requirebutterchurnpresets---promisepreset) option when constructing a Webamp instance. This allows you to specify which Butterchurn presets to use for the Milkdrop visualizer. If you don't specify this option, Webamp will use the default Butterchurn presets.
1414

15+
### Bug Fixes
16+
17+
- Fix bug where marquee dragging would error and not work.
18+
1519
## 2.2.0
1620

1721
:::info

packages/webamp/js/components/MainWindow/Marquee.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ function useDragX() {
104104

105105
document.addEventListener("mousemove", handleMouseMove);
106106
document.addEventListener("touchmove", handleMouseMove);
107-
document.addEventListener("touseup", handleMouseUp);
107+
document.addEventListener("mouseup", handleMouseUp);
108108
document.addEventListener("touchend", handleMouseUp);
109109

110110
return handleMouseUp;

packages/webamp/js/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,8 @@ function getPos(e: PosEvent): { clientX: number; clientY: number } {
421421
case "mousemove": {
422422
return e as MouseEvent;
423423
}
424+
case "pointerdown":
425+
return e as React.PointerEvent<HTMLElement>;
424426
default:
425427
throw new Error(`Unexpected event type: ${e.type}`);
426428
}

0 commit comments

Comments
 (0)