don't shrink textarea on blur
This commit is contained in:
parent
10c65561ed
commit
1105e3e016
@ -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");
|
||||
|
@ -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()
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user