From: Matt Corallo Date: Wed, 24 Jul 2024 19:25:51 +0000 (+0000) Subject: Full-select text box on first click, and submit on enter X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=842b71cf45d8b9d5c5f6b15386f8db637d305bf7;p=satsto.me Full-select text box on first click, and submit on enter Changes suggested by: josie --- 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;