Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Commit

Permalink
Home cursor in post body textarea.
Browse files Browse the repository at this point in the history
  • Loading branch information
echicken committed Jan 29, 2019
1 parent 14329e1 commit 9d18725
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/root/js/forum.js
Expand Up @@ -104,6 +104,7 @@ function addNew(sub) {
$('#newmessage-body').val(
$('#newmessage-body').val() + '\r\n' + data.signature
);
$("#newmessage-body")[0].setSelectionRange(0,0);
});
window.location.hash = '#newmessage';
$('#newmessage-body').keydown(function (evt) {
Expand Down Expand Up @@ -270,6 +271,8 @@ function addReply(sub, id) {
);
$.getJSON('./api/forum.ssjs?call=get-signature', function (data) {
$('#replytext-' + id).val($('#replytext-' + id).val() + '\r\n' + data.signature);
$('#replytext-' + id)[0].setSelectionRange(0,0);

});
$('#replytext-' + id).keydown(function (evt) {
evt.stopImmediatePropagation();
Expand Down

0 comments on commit 9d18725

Please sign in to comment.