summaryrefslogtreecommitdiffstats
path: root/hyperkitty/static
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-02-01 13:42:50 +0100
committerAurélien Bompard <aurelien@bompard.org>2013-02-01 16:37:23 +0100
commitf6a642a52e05f44f7131dfd182e707d6f1fe6e7e (patch)
tree9ba31770f6e79356a7cbca58cad5a758d4a4a604 /hyperkitty/static
parent0e944bed0d2f1774c2da52184ac30ab95dd8a11c (diff)
downloadhyperkitty-f6a642a52e05f44f7131dfd182e707d6f1fe6e7e.tar.gz
hyperkitty-f6a642a52e05f44f7131dfd182e707d6f1fe6e7e.tar.xz
hyperkitty-f6a642a52e05f44f7131dfd182e707d6f1fe6e7e.zip
give focus to the reply field when opened
Diffstat (limited to 'hyperkitty/static')
-rw-r--r--hyperkitty/static/js/hyperkitty.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/hyperkitty/static/js/hyperkitty.js b/hyperkitty/static/js/hyperkitty.js
index 7e297f4..7464314 100644
--- a/hyperkitty/static/js/hyperkitty.js
+++ b/hyperkitty/static/js/hyperkitty.js
@@ -142,7 +142,11 @@ function setup_favorites() {
function setup_replies() {
$("a.reply").click(function(e) {
e.preventDefault();
- $(this).next().slideToggle();
+ $(this).next().slideToggle("fast", function() {
+ if ($(this).css("display") === "block") {
+ $(this).find("textarea").focus();
+ }
+ });
});
$(".reply-form button[type='submit']").click(function(e) {
e.preventDefault();