bitaddress.org
bitaddress.org copied to clipboard
Fix for IOS devices so they can get past the entropy collection page
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:
- 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);">
- 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);
}
:+1: The first proposed solution would be ideal.
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.
Has this been impelmented?
Not yet