diff --git a/giraffe/src/components/SizedPlot.test.tsx b/giraffe/src/components/SizedPlot.test.tsx index 82f6e81c..7b5a994a 100644 --- a/giraffe/src/components/SizedPlot.test.tsx +++ b/giraffe/src/components/SizedPlot.test.tsx @@ -79,10 +79,7 @@ describe('the SizedPlot', () => { layerCanvasRef={layersRef} /> ) - // when the user (for real) does a single click, then a mouse up happens. - // choose mouse up because the single click listener wasn't triggering except on - // double clicks - fireEvent.mouseUp(screen.getByTestId('giraffe-inner-plot')) + fireEvent.click(screen.getByTestId('giraffe-inner-plot')) expect(resetSpy).not.toHaveBeenCalled() expect(fakeSingleClickInteractionHandler).toHaveBeenCalled() diff --git a/giraffe/src/components/SizedPlot.tsx b/giraffe/src/components/SizedPlot.tsx index 037f30c9..8e24452c 100644 --- a/giraffe/src/components/SizedPlot.tsx +++ b/giraffe/src/components/SizedPlot.tsx @@ -120,12 +120,6 @@ export const SizedPlot: FunctionComponent = ({ bottom: 0, } - // for single clicking; using mouseup, since the onClick only gets through - // with a double click; and the hover and drag target does not use a mouse up; - // they are: hover: mouseEnter, mousemove, mouseleave - // drag target: mouseDown - // and every time there is a single click, the mouse goes up. so using that instead. - return (
= ({ left: `${margins.left}px`, cursor: `${userConfig.cursor || 'crosshair'}`, }} - onMouseUp={callbacks.singleClick} + onClick={callbacks.singleClick} onDoubleClick={memoizedResetDomains} {...hoverTargetProps} {...dragTargetProps}