Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
Paperjs how to prevent multiple buttons canceling a drag event on mouseup / allow paperjs only use left button

If you:

  • mousedown left button ↓
  • mousedown right button ↓
  • mouseup right button ↑

The drag event gets canceled by mouseup right button , I don't want that to happen.
(only want that to happen on mouseup left button , because the event was started by mlb.)

  • I've tried preventDefault(), stopPropagation() on both paper and window event.
  • I've tried emitting mousedown/mousedrag on mouseup tool.emit("mousedown", tool.onMouseDown); not sure if I'm doing something wrong with it, but it runs the mousedown function once and stops, and I don't think it keeps event data from the first mousedown.

Is there any way to prevent this, maybe even preventing Paperjs from accessing the right button entirely if needed?

I know this has been kind and issue for a while now: https://github.com/paperjs/paper.js/issues/1355
yet there is a fix for accessing 1,2,3.. buttons (event as any).event.button,
there is no fix for preventing the dragging to be set to false.

P.S Appreciate for any help!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!