damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README | LICENSE

commit 2e568e4b44314c48c11e9982748351f40ba5bb6c
parent 64db658eab427adee4c8cf1bdac903e703714ff0
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 12 Nov 2022 12:38:09 -0800

web: focus reply box when replying

Diffstat:
Mweb/index.html | 2+-
Mweb/js/damus.js | 3+++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/web/index.html b/web/index.html @@ -12,7 +12,7 @@ <script defer src="js/noble-secp256k1.js?v=1"></script> <script defer src="js/bech32.js?v=1"></script> <script defer src="js/nostr.js?v=6"></script> - <script defer src="js/damus.js?v=65"></script> + <script defer src="js/damus.js?v=66"></script> </head> <body> <script> diff --git a/web/js/damus.js b/web/js/damus.js @@ -999,6 +999,7 @@ async function sign_id(privkey, id) function reply_to(evid) { const modal = document.querySelector("#reply-modal") + const replybox = modal.querySelector("#reply-content") modal.classList.remove("closed") const replying_to = modal.querySelector("#replying-to") @@ -1006,6 +1007,8 @@ function reply_to(evid) { const ev = DAMUS.all_events[evid] replying_to.innerHTML = render_event(DAMUS, ev, {is_composing: true, nobar: true, max_depth: 1}) + + replybox.focus() } const IMG_REGEX = /(png|jpeg|jpg|gif|webp)$/i