about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2020-10-17 05:36:54 +0900
committerGitHub <noreply@github.com>2020-10-17 05:36:54 +0900
commit001fcd96d5b88a541df4657f2df0d5125023f13b (patch)
tree873bd9741598b37674e9fbf07a65d6e2f39d2d52
parentd334059696e57b882903d9d852d3e64ae887f5ec (diff)
parenta577942a8f398a516a1156be8e3e672cd28edf3d (diff)
downloadrust-001fcd96d5b88a541df4657f2df0d5125023f13b.tar.gz
rust-001fcd96d5b88a541df4657f2df0d5125023f13b.zip
Rollup merge of #78013 - GuillaumeGomez:fix-sidebar-scroll-mobile-devices, r=jyn514
Fix sidebar scroll on mobile devices

Fixes #77942.

The issue was coming from the appearance/disappearance of the "wrapper" on the mobile devices web browsers, which triggers the "resize" event, calling the `hideSidebar` function is the JS code.

r? @jyn514
-rw-r--r--src/librustdoc/html/static/main.js4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/librustdoc/html/static/main.js b/src/librustdoc/html/static/main.js
index 1b3eb2011af..67e50bba1f2 100644
--- a/src/librustdoc/html/static/main.js
+++ b/src/librustdoc/html/static/main.js
@@ -2716,10 +2716,6 @@ function defocusSearchBar() {
         };
     }
 
-    window.onresize = function() {
-        hideSidebar();
-    };
-
     if (main) {
         onEachLazy(main.getElementsByClassName("loading-content"), function(e) {
             e.remove();