]> git.bitcoin.ninja Git - satsto.me/commitdiff
Full-select text box on first click, and submit on enter
authorMatt Corallo <git@bluematt.me>
Wed, 24 Jul 2024 19:25:51 +0000 (19:25 +0000)
committerMatt Corallo <git@bluematt.me>
Wed, 24 Jul 2024 19:25:51 +0000 (19:25 +0000)
Changes suggested by: josie <josibake@protonmail.com>

index.html

index 6c046cdac92c26f230adb09433607720b67395c0..cf61c8bf630216e40ab7aec51c59c5729e04e29d 100644 (file)
                                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;