]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added extra condition to focusing on notice form on page load. If the
authorSarven Capadisli <csarven@status.net>
Tue, 16 Mar 2010 19:53:49 +0000 (20:53 +0100)
committerSarven Capadisli <csarven@status.net>
Thu, 25 Mar 2010 20:46:49 +0000 (21:46 +0100)
window location contains a fragument identifier, it will skip focus
and do what the UA does natively.

js/util.js

index 3efda0d7b97a610bb0c03ab02647558a3af0709f..2e0f6e57bc462660b5a55398dd9c97a604ef6547 100644 (file)
@@ -86,7 +86,7 @@ var SN = { // StatusNet
                 $('#'+form_id+' #'+SN.C.S.NoticeTextCount).text(jQuery.data(form[0], 'ElementData').MaxLength);
             }
 
-            if ($('body')[0].id != 'conversation') {
+            if ($('body')[0].id != 'conversation' && window.location.hash.length === 0) {
                 $('#'+form_id+' textarea').focus();
             }
         },