about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorMichael Howell <michael@notriddle.com>2023-01-18 11:52:31 -0700
committerMichael Howell <michael@notriddle.com>2023-01-18 12:14:00 -0700
commitbb5fb53b30fd2216639ae85ab44ec4445e004556 (patch)
tree2ced14a4932a01ad29feba024f7b8d8aff2dd931 /src
parentdeb05758c8d7e13599617f322be8c03b22d1d724 (diff)
downloadrust-bb5fb53b30fd2216639ae85ab44ec4445e004556.tar.gz
rust-bb5fb53b30fd2216639ae85ab44ec4445e004556.zip
rustdoc: fix "?" keyboard command when radio button is focused
This extends the special case with checkbox settings to also cover radios.
Diffstat (limited to 'src')
-rw-r--r--src/librustdoc/html/static/js/main.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/js/main.js b/src/librustdoc/html/static/js/main.js
index 6cb670d32a6..604ab147f6a 100644
--- a/src/librustdoc/html/static/js/main.js
+++ b/src/librustdoc/html/static/js/main.js
@@ -390,7 +390,8 @@ function loadCss(cssUrl) {
         }
 
         if (document.activeElement.tagName === "INPUT" &&
-            document.activeElement.type !== "checkbox") {
+            document.activeElement.type !== "checkbox" &&
+            document.activeElement.type !== "radio") {
             switch (getVirtualKey(ev)) {
             case "Escape":
                 handleEscape(ev);