react-range icon indicating copy to clipboard operation
react-range copied to clipboard

Mouseup event not tirggered outside of component

Open iamterryclark opened this issue 5 years ago • 0 comments

Hi there,

Not sure if this is similar to issue #120 and issue #117.

I have implemented my own mouseup and down within the rendertrack which I pass the event over for the mouse down props.onMouseDown(e);. However, it seems I am unable to do the same for mouseup.

When dragging the slider and I mouseup outside of the component the event does not get triggered and so the mouse events get stolen for future mouse clicks.

Is there a work around for this you can think of?

Edit:

I also tried to implement mouseup here

export interface ITrackProps {
    style: React.CSSProperties;
    ref: React.RefObject<any>;
    onMouseDown: (e: React.MouseEvent) => void;
    onMouseUp: (e: React.MouseEvent) => void;
    onTouchStart: (e: React.TouchEvent) => void;
}

iamterryclark avatar Jan 22 '21 13:01 iamterryclark