From: Mikael Nordfeldth <mmn@hethane.se>
Date: Fri, 16 Jan 2015 11:00:45 +0000 (+0100)
Subject: Don't close main notice input on init if composing
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=59ec9c6988608f665fb7cea5eb4f3feb56db892f;p=quix0rs-gnu-social.git

Don't close main notice input on init if composing
---

diff --git a/js/util.js b/js/util.js
index 2861580456..19a9ead524 100644
--- a/js/util.js
+++ b/js/util.js
@@ -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) {