diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2022-01-18 04:42:00 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-18 04:42:00 +0100 |
| commit | cc2339ce83b6874b213b2385fd7eb7cb6c674aa1 (patch) | |
| tree | b865e7319f1f935b5e84ac7bf5b76adf100b4fd0 /src/test/rustdoc-gui | |
| parent | 804072fdfc4db19b4f3deac52fe8318a52ce19b5 (diff) | |
| parent | b71f1fb0027cf49909d8597fcc90a77d5f573cc3 (diff) | |
| download | rust-cc2339ce83b6874b213b2385fd7eb7cb6c674aa1.tar.gz rust-cc2339ce83b6874b213b2385fd7eb7cb6c674aa1.zip | |
Rollup merge of #92803 - jsha:hide-sidebar, r=GuillaumeGomez
Hide mobile sidebar on some clicks When the user clicks outside the sidebar, the sidebar should close. Also, when the user clicks an internal link in the sidebar, it should close. Fixes #92682 Demo: https://rustdoc.crud.net/jsha/hide-sidebar/std/string/struct.String.html
Diffstat (limited to 'src/test/rustdoc-gui')
| -rw-r--r-- | src/test/rustdoc-gui/sidebar-mobile.goml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/rustdoc-gui/sidebar-mobile.goml b/src/test/rustdoc-gui/sidebar-mobile.goml index 7138f916675..eecd584bca9 100644 --- a/src/test/rustdoc-gui/sidebar-mobile.goml +++ b/src/test/rustdoc-gui/sidebar-mobile.goml @@ -18,3 +18,11 @@ assert-css: (".sidebar-elems", {"display": "block", "left": "0px"}) // When we tab out of the sidebar, close it. focus: ".search-input" assert-css: (".sidebar-elems", {"display": "block", "left": "-246px"}) + +// Open the sidebar menu. +click: ".sidebar-menu" +assert-css: (".sidebar-elems", {"left": "0px"}) + +// Click elsewhere. +click: "body" +assert-css: (".sidebar-elems", {"left": "-246px"}) |
