edi9999 / jsqrcode

[deprecated] Lazarsoft's jsqrcode as a node module, object oriented, and with tests
Apache License 2.0
278 stars 63 forks source link

Safari: no result shown #27

Open maurocicio opened 7 years ago

maurocicio commented 7 years ago

Hi there,

I have setup a bare bone demo at http://la.cicio.org/?layout=node to verify for which browser jsqrcode works (your library is named codejs/jsqrcode/qr.js). It seems to work fine with Firefox on linux, windows, android, mac. When using safari, though, the decoded string is not visible. No message appears in the JS console (firebug), there are no errors, it just doesn't show the string. Is there any other information I could supply for you to figure out what is wrong?

Thank you!

igowerf commented 7 years ago

@maurocicio, it looks like Safari fails on line 80 of qrcode.js. In your example, it is line 3063 of qr.js. image.crossOrigin = "Anonymous"

I got it to work in Safari by commenting out that line and rebuilding.

maurocicio commented 7 years ago

Perfect, thanks!

Mauro

On 2 December 2016 at 19:47, James Lin notifications@github.com wrote:

@maurocicio https://github.com/maurocicio, it looks like Safari fails on line 80 of qrcode.js. In your example, it is line 3063 of qr.js.

var image = new Image(); image.crossOrigin = "Anonymous"; I got it to work in Safari by commenting out image.crossOrigin = "Anonymous" and rebuilding.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/edi9999/jsqrcode/issues/27#issuecomment-264530951, or mute the thread https://github.com/notifications/unsubscribe-auth/AAmeiDCzoJpKN3r9X2qVPnAATc1DxnXDks5rEGfUgaJpZM4KnQaz .

edi9999 commented 7 years ago

@igowerf do you think we should remove that line completely ?

maurocicio commented 7 years ago

I believe it would be enough to comment it out and add a comment there, should somebody else need that line.

Mauro

edi9999 commented 7 years ago

I don't understand because thiw was added here :

https://github.com/LazarSoft/jsqrcode/commit/20aa7cab9b86c7772760ec6466b182286452199f

And it seems to be correcting a bug ...

I find this quite difficult to understand