Scroll to the top when changing section.

This commit is contained in:
Nicolas Stepien 2013-02-20 18:05:19 +01:00
parent eb0cb429fd
commit e103ae6535
2 changed files with 3 additions and 1 deletions

View File

@ -1233,7 +1233,8 @@
section = $('section', Settings.dialog);
section.innerHTML = null;
section.className = "section-" + (this.title.toLowerCase().replace(/\s+/g, '-'));
return this.open(section, g);
this.open(section, g);
return section.scrollTop = 0;
},
main: function(section) {
var ID, arr, checked, description, hiddenNum, key, li, obj, post, thread, ul, _ref, _ref1, _ref2;

View File

@ -223,6 +223,7 @@ Settings =
section.innerHTML = null
section.className = "section-#{@title.toLowerCase().replace /\s+/g, '-'}"
@open section, g
section.scrollTop = 0
main: (section) ->
for key, obj of Config.main