mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 01:05:39 +03:00
rustdoc: fix "?" keyboard command when radio button is focused
This extends the special case with checkbox settings to also cover radios.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -212,6 +212,16 @@ press-key: "?"
|
||||
wait-for-css: ("#settings-menu .popover", {"display": "none"})
|
||||
wait-for-css: ("#help-button .popover", {"display": "block"})
|
||||
|
||||
// Now switch back to the settings popover, and make sure the keyboard
|
||||
// shortcut works when a check box is selected.
|
||||
click: "#settings-menu > a"
|
||||
wait-for-css: ("#settings-menu .popover", {"display": "block"})
|
||||
wait-for-css: ("#help-button .popover", {"display": "none"})
|
||||
focus: "#theme-system-preference"
|
||||
press-key: "?"
|
||||
wait-for-css: ("#settings-menu .popover", {"display": "none"})
|
||||
wait-for-css: ("#help-button .popover", {"display": "block"})
|
||||
|
||||
// Now we go to the settings page to check that the CSS is loaded as expected.
|
||||
goto: "file://" + |DOC_PATH| + "/settings.html"
|
||||
wait-for: "#settings"
|
||||
|
||||
Reference in New Issue
Block a user