File tree 2 files changed +12
-1
lines changed
src/librustdoc/html/static/js
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -390,7 +390,8 @@ function loadCss(cssUrl) {
390
390
}
391
391
392
392
if ( document . activeElement . tagName === "INPUT" &&
393
- document . activeElement . type !== "checkbox" ) {
393
+ document . activeElement . type !== "checkbox" &&
394
+ document . activeElement . type !== "radio" ) {
394
395
switch ( getVirtualKey ( ev ) ) {
395
396
case "Escape" :
396
397
handleEscape ( ev ) ;
Original file line number Diff line number Diff line change @@ -212,6 +212,16 @@ press-key: "?"
212
212
wait-for-css: ("#settings-menu .popover", {"display": "none"})
213
213
wait-for-css: ("#help-button .popover", {"display": "block"})
214
214
215
+ // Now switch back to the settings popover, and make sure the keyboard
216
+ // shortcut works when a check box is selected.
217
+ click: "#settings-menu > a"
218
+ wait-for-css: ("#settings-menu .popover", {"display": "block"})
219
+ wait-for-css: ("#help-button .popover", {"display": "none"})
220
+ focus: "#theme-system-preference"
221
+ press-key: "?"
222
+ wait-for-css: ("#settings-menu .popover", {"display": "none"})
223
+ wait-for-css: ("#help-button .popover", {"display": "block"})
224
+
215
225
// Now we go to the settings page to check that the CSS is loaded as expected.
216
226
goto: "file://" + |DOC_PATH| + "/settings.html"
217
227
wait-for: "#settings"
You can’t perform that action at this time.
0 commit comments