Browse Source

[shell] Auto scroll on new output with Firefox

Romain Rigaux 13 years ago
parent
commit
452ce74
1 changed files with 5 additions and 1 deletions
  1. 5 1
      apps/shell/src/shell/templates/index.mako

+ 5 - 1
apps/shell/src/shell/templates/index.mako

@@ -231,7 +231,11 @@ from desktop.views import commonheader, commonfooter
 										});
 										});
 									},500);
 									},500);
 								}
 								}
-								$('body').animate({scrollTop: $(document).height()}, 'slow');
+								var toScroll = -$(document).height();
+								if (jQuery.browser.webkit) {
+								  toScroll = -toScroll;
+								}
+								$("body").animate({scrollTop: toScroll}, "fast");
 								_shell.get(data[_shell.id].nextOffset);
 								_shell.get(data[_shell.id].nextOffset);
 							}
 							}
 						}
 						}