I have a site which makes extensive use of Keith Wood's excellent jQuery UI signature plugin. I've also used Touch punch as recommended. It's a very vanilla implementation but it's broken. I'm sure it was working previously.
I'm using a Surface Pro (touch enabled tablet) and the signature objects work fine until you scroll at which point two issues occur:
1: Any stylus strokes end up appearing as point to point lines (i.e. directly from the point where you put the stylus down until where lifted it up) rather than capturing any movement (e.g. curves) in between
2: The browser shows the following console error: "[Intervention] Ignored attempt to cancel a touchstart event with cancelable=false, for example because scrolling is in progress and cannot be interrupted."
Sometimes it starts working after a few clicks but it's hit and miss, often the same issue keeps cropping up for a while after scrolling.
Includes:
https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/south-street/jquery-ui.css
/public/front_css/jquery.signature.css
js/excanvas.js
https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js
https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js
/public/front_js/jquery.signature.min.js
/public/front_js/jquery.ui.touch-punch.min.js
Some code:
function checkifallfieldsfilled()
{
var empty = false;
$('form > input').each(function()
{
if ($(this).val() == '')
{
empty = true;
}
});
$('form > select').each(function()
{
if ($(this).val() == '')
{
empty = true;
}
});
if (empty)
{
$('#btnProcess').attr('disabled', 'disabled');
} else
{
$('#btnProcess').removeAttr('disabled');
var sound = new Audio('/public/sounds/sound.mp3');
sound.play();
}}
$(function()
{
$('#page1_initials_b').signature({guideline: false,change: function(event, ui)
{
$('#ini_page1_initials_b').val($('#page1_initials_b').signature('toSVG'));
checkifallfieldsfilled();
}
});
$('#btnClear_page1_initials_b').click(function()
{
$('#page1_initials_b').signature('clear');
});
});
Any help would be gratefully received!