]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix for ticket http://status.net/open-source/issues/2380 "Autofocus
authorZach Copley <zach@status.net>
Wed, 23 Jun 2010 18:29:13 +0000 (11:29 -0700)
committerZach Copley <zach@status.net>
Wed, 23 Jun 2010 18:29:13 +0000 (11:29 -0700)
shouldn't override scroll" -- Thanks @michaeltwofish!

js/util.js

index 1320d11b4b71015b8bbac7a58ab00fc71ae7f6c5..29b33097b18f771ab35a15dc68d091b895d8d99a 100644 (file)
@@ -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();
             }
         },