From 842b71cf45d8b9d5c5f6b15386f8db637d305bf7 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Wed, 24 Jul 2024 19:25:51 +0000 Subject: [PATCH] Full-select text box on first click, and submit on enter Changes suggested by: josie --- index.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/index.html b/index.html index 6c046cd..cf61c8b 100644 --- a/index.html +++ b/index.html @@ -351,6 +351,14 @@ document.getElementById("address").onkeypress = check_text; document.getElementById("address").oninput = check_text; check_text(); + document.getElementById("address").onfocus = function() { + if (this.value === 'send.some@satsto.me') + document.getElementById("address").select(); + }; + document.getElementById("address").onkeydown = function(event) { + if(event.which == 13 || event.keyCode == 13) + lookup_domain(); + }; window.lookup_domain = function() { if (document.getElementById("paybutton").classList.contains("go-button-disabled")) { return; -- 2.39.5