bencentra / jq-signature

jQuery plugin for creating touch-friendly signature fields using the HTML5 canvas
http://bencentra.github.io/jq-signature/
MIT License
47 stars 28 forks source link

Change event isn't triggered if signing continues to outside of canvas #16

Open chrisfnz opened 7 months ago

chrisfnz commented 7 months ago

I've identified an issue with this library if drawing a signature and the pen reaches outside the canvas:

  1. The jq.signature.changed event isn't triggered until/unless returning the pointer to the canvas and doing a penup / left mouse click.
  2. Drawing continues in the canvas even if pen isn't down / left mouse button isn't clicked any more.

I would appreciate your consideration of the the following recommended fixes:

  1. Ensure jq.signature.changed event is triggered when-ever leaving the canvas.
  2. Drawing once back inside the canvas only works if pen is down or left mouse button is clicked.

Thank you.