Fix issue with cursor moving back to 0,0 after a refresh.
This commit is contained in:
		
							parent
							
								
									e4eb8cb1ec
								
							
						
					
					
						commit
						603a9fd3e8
					
				@ -77,7 +77,11 @@
 | 
			
		||||
    socket.on('download allNotes', function(msg){
 | 
			
		||||
        //console.log(msg);
 | 
			
		||||
        userKeypress = false;   // Set this back to false, still getting infinite loop.
 | 
			
		||||
        var cursorPos = editor.getCursor();
 | 
			
		||||
        var scrollTop = editor.getScrollerElement().scrollTop;
 | 
			
		||||
        editor.getDoc().setValue(msg);
 | 
			
		||||
        editor.setCursor(cursorPos);
 | 
			
		||||
        editor.scrollTo(null, scrollTop);
 | 
			
		||||
    });
 | 
			
		||||
 | 
			
		||||
    document.onkeydown = function(){ userKeypress = true; };
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user