Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iPad issue #25

Closed
mikehoague opened this issue Mar 15, 2012 · 0 comments
Closed

iPad issue #25

mikehoague opened this issue Mar 15, 2012 · 0 comments

Comments

@mikehoague
Copy link

Bug Description - When the Signature Pad is displayed and the user selects "Sign It" then selects "Type It" normally the signature pad will not allow drawing. However, on the iPad the user can continue to draw on the signature pad over the typed letters.

This is what I did to get it to work correctly

/**

  • Removes all the mouse events from the canvas
    *

  • @Private
    */
    function disableCanvas () {
    eventsBound = false

    if (touchable) {
    canvas.each(function () {
    this.removeEventListener('touchstart', stopDrawing);
    this.removeEventListener('touchend', stopDrawing);
    this.removeEventListener('touchmove', drawLine);
    //////////////////////////////////////
    //added to properly stop the on touch start listener
    this.ontouchstart = null;
    ///////////////////////////////////////
    })
    } else {
    canvas.unbind('mousedown.signaturepad')
    canvas.unbind('mouseup.signaturepad')
    canvas.unbind('mousemove.signaturepad')
    canvas.unbind('mouseleave.signaturepad')
    }

    $(settings.clear, context).unbind('click.signaturepad')
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants