Skip to content

onClick not working react-moveable #565

@vietanhbui

Description

@vietanhbui

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions