diff --git a/isso/js/app/forms.js b/isso/js/app/forms.js index 5b48c88..9f37565 100644 --- a/isso/js/app/forms.js +++ b/isso/js/app/forms.js @@ -15,13 +15,9 @@ define(["lib/HTML"], function(HTML) { textarea.value = defaults.text || ""; textarea.placeholder = "Kommentar hier eintippen (andere Felder sind optional)" textarea.onfocus = function() { - textarea.rows = 10; + textarea.rows = 8; // scrollIntoView enhancement }; - textarea.onblur = function() { setTimeout(function() { - if (textarea.value == "" && document.activeElement != textarea) { - textarea.rows = 2 - }}, 500)}; form.add("input[type=submit]").value = "Kommentar hinzufügen"; form.add("span"); diff --git a/isso/js/app/isso.js b/isso/js/app/isso.js index cf2aa20..48c2511 100644 --- a/isso/js/app/isso.js +++ b/isso/js/app/isso.js @@ -179,7 +179,9 @@ define(["lib/q", "lib/HTML", "helper/utils", "helper/identicons", "./api", "./fo rootmsgbox.query("[name=email]").value = ""; rootmsgbox.query("[name=website]").value = ""; rootmsgbox.query("textarea").value = ""; - insert(rv); + rootmsgbox.query("textarea").rows = 2; + rootmsgbox.query("textarea").blur(); + insert(rv, true); }) event.preventDefault() });