-
Notifications
You must be signed in to change notification settings - Fork 462
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Catch against IE's broken storage events #47
base: master
Are you sure you want to change the base?
Conversation
Only deal with storage events that come while the document is not in focus. See also: http://stackoverflow.com/questions/18476564/ie-localstorage-event-misfired
…services may be present but inaccessible
…storage capability if disabled in Chrome.
…ther than 'true' when functioning correctly
@dpogue can you update your branch? I've had issues with IE as well. |
@futurechan I'm not sure I want some of the newer changes, particularly ones that will trigger extra digest cycles and slow Angular down :( |
@dpogue do you plan to maintain your fork indefinitely? |
I wonder what recourse I have. This has been clutch for firefox and chrome users. |
I think the best (and should maybe fix IE event handling) would be to have ngStorage's $localStorage and ngStorage's event handling use the same debounce for updating it's values. As it is now when handling storageEvents it's kind of hacky (and it does force an apply, extra digest cycle). I'll look into that if you want me to. |
@egilkh that would be great. I'm willing to try too, but I can tell you right now I have no idea what I'm doing. |
Great fix! The master branch is not working at all in IE 10/ IE11 for me |
@abeninskibede Nice to know you think it's great! Can you provide a error message or explanation of what is it that is not working? |
@egilkh Don't see any errors in the console. The bug: |
Hmm, that is indeed strange. I must admit I almost never use $default. Would you be able to provide a failing snippet of code (minimal example) so I can dig into it (easier than me guessing your usage) ? |
Then I push widgets using tabs[x].widgets.push(new {}) |
Should fix gsklee#171, gsklee#167 Ref gsklee#47 Not sure if gsklee#47 is fixed yet.
Only deal with storage events that come while the document is not in focus.
See also: http://stackoverflow.com/questions/18476564/ie-localstorage-event-misfired
This caused us some problems when we were making multiple writes to localStorage and seeing data get overwritten with old values or disappear entirely: