From 27f43316521a1cc94ef939e2da06d8389faa4bbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=BCnter?= Date: Tue, 29 Nov 2022 14:53:42 +0100 Subject: [PATCH] Enable Command Palette for radio buttons (#5894) Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com> --- src/ui/zabapgit_js_common.w3mi.data.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/ui/zabapgit_js_common.w3mi.data.js b/src/ui/zabapgit_js_common.w3mi.data.js index c51cfe7fb..4e1a9d326 100644 --- a/src/ui/zabapgit_js_common.w3mi.data.js +++ b/src/ui/zabapgit_js_common.w3mi.data.js @@ -2443,6 +2443,17 @@ function enumerateUiActions() { }); }); + // radio buttons + [].slice.call(document.querySelectorAll("input[type='radio']")) + .forEach(function(input){ + items.push({ + action: function(){ + input.click(); + }, + title: document.querySelector("label[for='" + input.id + "']").textContent + }); + }); + // others: // - links inside forms // - label links