Enable Command Palette for radio buttons (#5894)

Co-authored-by: Marc Bernard <59966492+mbtools@users.noreply.github.com>
This commit is contained in:
Christian Günter 2022-11-29 14:53:42 +01:00 committed by GitHub
parent 7190cab413
commit 27f4331652
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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