浏览代码

[shell] Auto scroll on new output with Firefox

Romain Rigaux 13 年之前
父节点
当前提交
452ce74
共有 1 个文件被更改,包括 5 次插入1 次删除
  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);
 								}
-								$('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);
 							}
 						}