mikehostetler / amplify

AmplifyJS
http://amplifyjs.com
GNU General Public License v2.0
1.45k stars 143 forks source link

amplify.store('key') always return null when navigate Back from another page #61

Closed cheeaun closed 11 years ago

cheeaun commented 12 years ago

Here's a testcase: http://jsbin.com/3/oxexoc

On initial page load, everything works fine until you click on a web page (on another domain) then navigate Back. The localStorage reference in amplify.store code seems lost and returns a zero length, which probably explains why amplify.store('key') is always returning null. If you try to access directly to the localStorage instance, the key is actually there.

This bug is replicable on Safari 5.1.2 (7534.52.7) on Windows and Mobile Safari (7534.48.3) on iOS5 (iPhone).

jakerella commented 11 years ago

Just confirming, the demo is working on Chrome & Firefox on Linux, and Chrome, IE 8, and Safari on Windows XP. IE9 blocks the script include from raw Github files, but my guess is it works there just fine.

jakerella commented 11 years ago

Fixed the jsbin for IE9 (which requires proper mime types on script includes): http://jsbin.com/oboleh/1/

dcneiner commented 11 years ago

Also tested this on Safari 6 on Mac, and Safari on iOS 6, couldn't duplicate. It has either been fixed, or we'll need more information to duplicate it. Closing for now. Thanks for checking @jakerella