Attempt to sorta fix the scroll locker resetting

This commit is contained in:
benmcmahon100
2015-08-20 16:48:46 +01:00
parent 27cac3067a
commit d52a2d8da0
6 changed files with 24 additions and 3 deletions

View File

@@ -330,6 +330,7 @@ codeStorage.isAlive = function() {
(val && val.length > 0);
}
codeStorage.updateStorage = function(){
document.getElementById('scroll-locker').dispatchEvent(new CustomEvent('previewUpdateSpy', {'detail': $('.scroll-locker').scrollTop()}));
if(typeof(Storage) !== undefined) {
var value = editor.getValue();
localStorage.setItem(codeStorage.keyValue, value);