You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I see that the QR code is generated on canvas, and then copied to an img element using base64 and the canvas is hidden.
This process does not seem to work properly on Android. The canvas is visible (but should be hidden), and the src attribute of the img is empty, which gives the impression that the image is hidden. However, it works as expected on iOS.
Tested this on the following devices/browsers:
Android
Samsung M31
Samsung Internet 19.0.6.3
Chrome 108.0.5359
Xiaomi Mi 6
Browser V11.1.9-g
Chrome 108.0.5359
iOS
iPhone 13 Pro
Safari (iOS 16.1.1)
Chrome 108.0.5359
I had to figure out a way to show the QR (and style the canvas and the image the same) on both desktop and mobile.
I figured out what the problem is when I took a quick look at the source code.
The following function assumes the user agent string will include only decimal numbers and that the integer will be only single digit. So when it encounters the Android 12 string in the ua, it fails.
I see that the QR code is generated on canvas, and then copied to an img element using base64 and the canvas is hidden.
This process does not seem to work properly on Android. The canvas is visible (but should be hidden), and the src attribute of the img is empty, which gives the impression that the image is hidden. However, it works as expected on iOS.
Tested this on the following devices/browsers:
I had to figure out a way to show the QR (and style the canvas and the image the same) on both desktop and mobile.
The code I used to test this out:
On desktop, I see the green one. On mobile, it's the red one.
The text was updated successfully, but these errors were encountered: