Skip to content

Commit

Permalink
Stop mousedown event propagation in the Focuser (#10575)
Browse files Browse the repository at this point in the history
  • Loading branch information
hbenl authored Jun 18, 2024
1 parent 7dcecab commit fdbddbf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ui/components/Timeline/Focuser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { getPositionFromTime, getTimeFromPosition } from "ui/utils/timeline";

import { EditMode } from "./Timeline";

function stopEvent(event: MouseEvent) {
function stopEvent(event: MouseEvent | React.MouseEvent) {
event.preventDefault();
event.stopPropagation();
}
Expand Down Expand Up @@ -206,7 +206,7 @@ function Focuser({ editMode, setEditMode }: Props) {
const right = getPositionFromTime(focusWindow.end, zoomRegion);

return (
<div className="relative top-0 left-0 h-full w-full" ref={containerRef}>
<div className="relative top-0 left-0 h-full w-full" onMouseDown={stopEvent} ref={containerRef}>
<div
className="group absolute h-full"
ref={draggableAreaRef}
Expand Down

0 comments on commit fdbddbf

Please sign in to comment.