Преглед изворни кода

Fix le scroll en changeant d'article

Marien Fressinaud пре 12 година
родитељ
комит
978a48a1d6
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      app/views/javascript/main.phtml

+ 3 - 0
app/views/javascript/main.phtml

@@ -54,6 +54,9 @@ function toggleContent (new_active, old_active) {
 	if (hide_posts) {
 		old_active.children (".flux_content").toggle (0);
 
+		new_pos = new_active.position ().top;
+		old_scroll = $(box_to_move).scrollTop ();
+
 		if(relative_move) {
 			new_pos += old_scroll;
 		}