From 690d70bc7abaabf2516c308e8080e51556ffe8f6 Mon Sep 17 00:00:00 2001 From: Gavin Troy Date: Sun, 19 Feb 2023 20:03:52 +0000 Subject: [PATCH] Autofocus inputs, handle Enter key after entering decryption password --- static/custom.js | 9 +++++++++ static/index.html | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/static/custom.js b/static/custom.js index e81b39d..8f0d2d7 100644 --- a/static/custom.js +++ b/static/custom.js @@ -134,6 +134,15 @@ $(document).ready(function() { $('#burn-dropdown-btn').text("Burn: " + this.innerHTML); }); + $('#password-modal').on('shown.bs.modal', function () { + $('#modal-password').trigger('focus'); + }) + + $('#password-modal form').submit(function(event) { + event.preventDefault(); + $('#decrypt-btn').click(); + }); + $('#decrypt-btn').click(function(event) { var pass = $("#modal-password").val(); var data = ""; diff --git a/static/index.html b/static/index.html index faeb2cb..da3b4e6 100644 --- a/static/index.html +++ b/static/index.html @@ -254,7 +254,7 @@ {{#if is_editable}}
- +
{{/if}} {{#if is_created or is_clone}}