From ceea65cfa861d7e1ce4eaf070f023cfdedb737aa Mon Sep 17 00:00:00 2001 From: cryptogopher Date: Fri, 5 Apr 2024 02:20:12 +0200 Subject: [PATCH] Refine styling and scripts --- app/assets/stylesheets/application.css | 1 + app/views/units/index.html.erb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 673149d..7c38a6e 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -372,6 +372,7 @@ table.items td.subunit:has(input) { padding-inline-start: calc(1.4em - 1px); } table.items td.actions { + align-items: center; display: flex; gap: 0.4em; justify-content: end; diff --git a/app/views/units/index.html.erb b/app/views/units/index.html.erb index 8ad076d..db9e8f4 100644 --- a/app/views/units/index.html.erb +++ b/app/views/units/index.html.erb @@ -33,7 +33,7 @@ <%= javascript_tag do %> function processKey(event) { if (event.key == "Escape") { - event.target.closest("tr").querySelector("a[name=cancel]").click(); + event.currentTarget.querySelector("a[name=cancel]").click(); } }