summaryrefslogtreecommitdiff
path: root/js/quick-reply.js
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-11-11 21:54:35 +0100
committerczaks <marcin@6irc.net>2013-11-11 21:54:35 +0100
commitf5657caf24753ed7c25d56659ae8dfe79d48b99a (patch)
tree989f1149070194f18f6250c851159dda813151fe /js/quick-reply.js
parent0a58973631626879abeea4956b33cc2b56dea453 (diff)
parent9fb63b053fbb552a2a8bbde1e230a8b73296fb6d (diff)
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard into vichan-devel-4.5
Conflicts: inc/config.php install.php post.php stylesheets/style.css
Diffstat (limited to 'js/quick-reply.js')
-rw-r--r--js/quick-reply.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/js/quick-reply.js b/js/quick-reply.js
index 19977b1d..2580137b 100644
--- a/js/quick-reply.js
+++ b/js/quick-reply.js
@@ -370,13 +370,19 @@
if ($(this).width() <= 800)
return;
show_quick_reply();
- $('#quick-reply textarea').focus();
if (with_link) {
- $(window).ready(function() {
+ $(document).ready(function() {
if ($('#' + id).length) {
highlightReply(id);
- $(window).scrollTop($('#' + id).offset().top);
+ $(document).scrollTop($('#' + id).offset().top);
}
+
+ // Honestly, I'm not sure why we need setTimeout() here, but it seems to work.
+ // Same for the "tmp" variable stuff you see inside here:
+ setTimeout(function() {
+ var tmp = $('#quick-reply textarea[name="body"]').val();
+ $('#quick-reply textarea[name="body"]').val('').focus().val(tmp);
+ }, 1);
});
}
});