]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Don't close main notice input on init if composing
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 16 Jan 2015 11:00:45 +0000 (12:00 +0100)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 16 Jan 2015 11:00:45 +0000 (12:00 +0100)
js/util.js

index 2861580456b4866ea3167e50fa41624f02b2f5c3..19a9ead52462f236f7878146104846dfad35e89e 100644 (file)
@@ -1438,7 +1438,15 @@ var SN = { // StatusNet
                 // when forms get displayed for the first time...
 
                 // Initially hide all tabs on the top of the page
-                SN.U.switchInputFormTab(null);
+                // if there's no data in there yet.
+                var fields = $('#content .input_forms .input_form.current').find('textarea, input[type=text], input[type=""]');
+                var anything = false;
+                fields.each(function () {
+                    anything = anything || $(this).val();
+                });
+                if (!anything) {
+                    SN.U.switchInputFormTab(null);
+                }
 
                 // Make inline reply forms self-close when clicking out.
                 $('body').on('click', function (e) {