brinley / jSignature

jQuery plugin for adding web signature functionality
http://www.unbolt.net/jSignature
696 stars 529 forks source link

Not working with Android 4.0.4 #32

Closed nkritikos closed 11 years ago

nkritikos commented 11 years ago

Hi, It seems not to work with Android 4.0.4 (fyi i tried with all the versions of jquery from 1.7.2 up to 1.9.1 , knockout.js from 2.10. to 2.2.1) But it works just fine with previous version of Android for example 2.3.6 , and in all common browsers Any clue ?

brinley commented 11 years ago

Works fine for me on 4.2.1 but I don't have a device on 4.0.4 to test with. Can you tell me if it works when you go to http://www.unbolt.net/jSignature if the signing doesnt seem to be working. Can you click on the export button and tell me if the base64 string comes up? On Mar 28, 2013 1:56 AM, "nkritikos" notifications@github.com wrote:

Hi, It seems not to work with Android 4.0.4 (fyi i tried with all the versions of jquery from 1.7.2 up to 1.9.1 , knockout.js from 2.10. to 2.2.1) But it works just fine with previous version of Android for example 2.3.6 , and in all common browsers Any clue ?

— Reply to this email directly or view it on GitHubhttps://github.com/brinley/jSignature/issues/32 .

nkritikos commented 11 years ago

It works fine when i try directly from all browsers in my desktop pc.. From my android device it works only when i use chrome versio for androids.. But i want to use it in a cross-platform application built with dxtreme (devxpress mobile platform) I use jquery-1.7.2 and knockout-2.1.0 .. from which it works in simulator mode , but for previous versions of Android.. [html]


[js]

var emptydataurl = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA/wAAAF+CAYAAAA/RhEBAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAYfSURBVHhe7cexCcAwDABBR5N5A83qDTyZcKM6TSBguGueHwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH97ulwsM2dVzV4AAIBPImKvtXYvl4ouAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAvBvjAFKCCASFOsDHAAAAAElFTkSuQmCC";

var dataurl;
var Signature= ko.observable();

showPopup = function () {
    var popup = $("#popup").data("dxPopup");
    var signdiv = $("#signature");
    var parentheight = $("#popup").height();
    var parentwidth = $("#popup").width();
    var signheight = 0.7 \* parentheight;
    var signwidth = 0.95 \* parentwidth;

if (signdiv[0].childElementCount == 0) { $("#signature").jSignature({ lineWidth: 1, width: signwidth, height: signheight, signatureLine: false }); } dataurl = Signature(); $("#signature").jSignature("clear"); if (dataurl !== null) { { if (dataurl !== emptydataurl) $("#signature").jSignature("setData", dataurl); } } popup.show();



};

hidePopup = function () {
    var popup = $("#popup").data("dxPopup");
    dataurl = $("#signature").jSignature("getData")
    Signature(dataurl);
    $("#signature").jSignature("clear");
    popup.hide();
};

clearsign = function () {
    var signdiv = $("#signature");
    if (signdiv[0].childElementCount !== 0) { $("#signature").jSignature("clear"); }
};
brinley commented 11 years ago

You haven't quite answered my previous message of testing your devices on my demo page. I'm trying to determine from your response to that question if the issue stems jSignature not working on stock jSignature, because of the browser (chrome, stock android browser etc), the OS version or your inclusion of other JS libraries.

nkritikos commented 11 years ago

Sorry.. But im not sure either.. More probably is the android built-in browser .. Thanks anyway