##// END OF EJS Templates
Scroll to bottom when the form mode changes
neko259 -
r686:64d75fce default
parent child Browse files
Show More
@@ -36,8 +36,10 b' function swapForm() {'
36 compactForm.find('textarea')[0].value = oldText;
36 compactForm.find('textarea')[0].value = oldText;
37 }
37 }
38 isCompact = !isCompact;
38 isCompact = !isCompact;
39
40 scrollToBottom();
39 }
41 }
40
42
41 if (compactForm.length > 0) {
43 if (compactForm.length > 0) {
42 fullForm.toggle();
44 fullForm.toggle();
43 } No newline at end of file
45 }
@@ -51,4 +51,9 b' function addQuickReply(postId) {'
51 $("html, body").animate({ scrollTop: $(textAreaId).offset().top }, "slow");
51 $("html, body").animate({ scrollTop: $(textAreaId).offset().top }, "slow");
52 }
52 }
53
53
54 function scrollToBottom() {
55 var $target = $('html,body');
56 $target.animate({scrollTop: $target.height()}, 1000);
57 }
58
54 $('#full-form').toggle();
59 $('#full-form').toggle();
@@ -100,8 +100,7 b' function updateThread() {'
100 loading = false;
100 loading = false;
101
101
102 if (bottom) {
102 if (bottom) {
103 var $target = $('html,body');
103 scrollToBottom();
104 $target.animate({scrollTop: $target.height()}, 1000);
105 }
104 }
106
105
107 var hasPostChanges = (updatedPosts.length > 0)
106 var hasPostChanges = (updatedPosts.length > 0)
General Comments 0
You need to be logged in to leave comments. Login now