moveable icon indicating copy to clipboard operation
moveable copied to clipboard

onClick not working react-moveable

Open vietanhbui opened this issue 4 years ago • 1 comments

Environments

  • Framework name: react-moveable
  • Framework version: Reactjs latest
  • Moveable Component version: 0.30.1
  • Testable Address(optional):

Description

When i use prop clipArea={true}, onClick not working, but if clipArea={false}, onClick is working.

<Moveable
   target={target}
   draggable={true}
   throttleDrag={0}
   startDragRotate={0}
   throttleDragRotate={0}
   zoom={1}
   origin={false}
   padding={{ left: 0, top: 0, right: 0, bottom: 0 }}
   clippable={true}
   clipRelative={false}
   clipArea={true} // Problem
   hideDefaultLines={true}
   dragWithClip={true}
   defaultClipPath={'polygon'}
   clipTargetBounds={true}
   onClick={() => {
       console.log('AAA');
   }}
/>

Any idea, is this a bug or am I missing something?

vietanhbui avatar Nov 18 '21 02:11 vietanhbui

@vietanhbui

react-moveable in 0.30.3 is working. Try 0.30.3 version

daybrush avatar Jan 03 '22 18:01 daybrush