aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorwinter2025-03-20 19:08:49 +0000
committerwinter2025-03-20 19:08:49 +0000
commitc10a1ea700a94e4eff8b10985cd402943ad07859 (patch)
tree7eb52fdf59f665046af39ff3b96999ec60377fe5
parent8f2e7d161e46dffbce0236cb278ff294732e12d5 (diff)
autofocus textarea when clicking reply button
-rw-r--r--templates/note/reply_button.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/note/reply_button.php b/templates/note/reply_button.php
index dadc121..de4cb1b 100644
--- a/templates/note/reply_button.php
+++ b/templates/note/reply_button.php
@@ -7,7 +7,10 @@ $icon = $note->inReplyTo == null ? 'reply' : 'reply-all';
$id = "interactButton-reply-$note->id";
?>
<div class="interactButtonContainer reply">
- <button title="<?= __('note.action.reply') ?>" class="material-symbols <?= $icon ?>" id="<?= $id ?>" <?= ($disabled ?? false) ? 'disabled' : '' ?>
- _="on click send toggle to [me, next .noteReplyForm] on toggle toggle .active on closest <div/>"></button>
+ <button title="<?= __('note.action.reply') ?>" class="material-symbols <?= $icon ?>" id="<?= $id ?>" <?= ($disabled ?? false) ? 'disabled' : '' ?> _="
+ on click
+ send toggle to [me, next .noteReplyForm]
+ tell next <textarea/> js(you) you.focus() end
+ on toggle toggle .active on closest <div/>"></button>
<label for="<?= $id ?>"><?= $count ?? '' ?></label>
</div> \ No newline at end of file