From: Zach Copley Date: Wed, 23 Jun 2010 18:29:13 +0000 (-0700) Subject: Fix for ticket http://status.net/open-source/issues/2380 "Autofocus X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=72e486a3226c9101f33bd86f953dbb9650c19fd1;p=quix0rs-gnu-social.git Fix for ticket http://status.net/open-source/issues/2380 "Autofocus shouldn't override scroll" -- Thanks @michaeltwofish! --- diff --git a/js/util.js b/js/util.js index 1320d11b4b..29b33097b1 100644 --- a/js/util.js +++ b/js/util.js @@ -84,7 +84,7 @@ var SN = { // StatusNet form.find('#'+SN.C.S.NoticeTextCount).text(jQuery.data(form[0], 'ElementData').MaxLength); } - if ($('body')[0].id != 'conversation' && window.location.hash.length === 0) { + if ($('body')[0].id != 'conversation' && window.location.hash.length === 0 && $(window).scrollTop() == 0) { form.find('textarea').focus(); } },