mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
focus on quick reply textarea
This commit is contained in:
parent
8a5d6b1d3f
commit
01857d176a
@ -365,13 +365,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').val();
|
||||
$('#quick-reply textarea').val('').focus().val(tmp);
|
||||
}, 1);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user