bitaddress.org icon indicating copy to clipboard operation
bitaddress.org copied to clipboard

Fix for IOS devices so they can get past the entropy collection page

Open cantonbecker opened this issue 11 years ago • 4 comments

The current release doesn't work on IOS devices (iPad, iPhone) because UI interaction (especially tapping/clicking) doesn't work. You can't seed the random number generator, even by clicking on the textbox.

Not sure if this is the best way to fix it, but I tested this and it works:

  1. Add ontouchmove seeding to the body tag. This way you can drag your finger around the screen to add entropy -- much nicer than typing in characters:
 <body onclick="SecureRandom.seedTime();" onmousemove="ninja.seeder.seed(event);" ontouchmove="ninja.seeder.seed(event);">
  1. Around line 6735, don't body.appendChild for IOS users. Sorry iPad users, no green dots for you. It took me about an hour to figure out that this was the particular line that was breaking IOS, and I'm ashamed to admit I have no idea why you can't add these divs on IOS without breaking the whole UI. I'm also ashamed to pollute the code with a browser-specific directive... but unless anybody has access to a javascript debugger for IOS safari... ?
    // body-appending these divs on IOS breaks the ability to click on anything
    if (navigator.platform != 'iPad' && navigator.platform != 'iPhone' && navigator.platform != 'iPod') {
        document.body.appendChild(div);
    }

cantonbecker avatar Feb 06 '14 21:02 cantonbecker

:+1: The first proposed solution would be ideal.

smileyborg avatar Mar 09 '14 21:03 smileyborg

Sorry I should have been more clear -- this fix isn't an either / or thing. I had to implement both #1 and #2 for IOS support.

cantonbecker avatar Mar 10 '14 01:03 cantonbecker

Has this been impelmented?

mathiasrw avatar Sep 18 '15 12:09 mathiasrw

Not yet

pointbiz avatar Sep 19 '15 03:09 pointbiz