mirror of
				https://github.com/ether/etherpad-lite.git
				synced 2025-11-04 02:01:30 +01:00 
			
		
		
		
	Don't screw up, if chat is empty.
This commit is contained in:
		
							parent
							
								
									7653db36fe
								
							
						
					
					
						commit
						f12cb0dd58
					
				@ -63,7 +63,7 @@ var chat = (function()
 | 
				
			|||||||
    scrollDown: function()
 | 
					    scrollDown: function()
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      if($('#chatbox').css("display") != "none"){
 | 
					      if($('#chatbox').css("display") != "none"){
 | 
				
			||||||
        if(!self.lastMessage || self.lastMessage.position().top < $('#chattext').height()) {
 | 
					        if(!self.lastMessage || !self.lastMessage.position() || self.lastMessage.position().top < $('#chattext').height()) {
 | 
				
			||||||
          $('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow");
 | 
					          $('#chattext').animate({scrollTop: $('#chattext')[0].scrollHeight}, "slow");
 | 
				
			||||||
          self.lastMessage = $('#chattext > p').eq(-1);
 | 
					          self.lastMessage = $('#chattext > p').eq(-1);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user