summaryrefslogtreecommitdiff
path: root/lib/rdoc/generator/template/darkfish/js
diff options
context:
space:
mode:
authorJames Reid-Smith <[email protected]>2024-12-15 08:24:50 -0500
committergit <[email protected]>2024-12-15 13:24:53 +0000
commitf9dc41b6a961f27bc3151cdef3674911e0b564e7 (patch)
tree4fcbde4bac1709ee316a0b98c51c3b752dcc6f5e /lib/rdoc/generator/template/darkfish/js
parent2c57b87cc3ffd7d65ff2c096f9f860bdb9f540dd (diff)
[ruby/rdoc] Fix iPad Pro navigation not shown
(https://github.com/ruby/rdoc/pull/1236) Found this issue when I was debugging the navigation toggle. I noticed it first in the chrome dev tools, but it was also reproducible on an iPad Pro. Symptom: - On iPad Pro, the navigation section is hidden but there's enough space to show it. Making the user have to click the hamburger button to show it but it's not necessary to hide the navigation section. - On desktop, the navigation section is shown. - On mobile, the navigation section is hidden until the hamburger button is clicked. Fix: - The javascript code was matching 1024px instead of 1023px. The media sections of the css was altering the layout on 1024px. So ipad got the full desktop layout but the navigation section was hidden. https://github.com/ruby/rdoc/commit/1794e59755
Diffstat (limited to 'lib/rdoc/generator/template/darkfish/js')
-rw-r--r--lib/rdoc/generator/template/darkfish/js/darkfish.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/generator/template/darkfish/js/darkfish.js b/lib/rdoc/generator/template/darkfish/js/darkfish.js
index aeb8526344..ed3893379d 100644
--- a/lib/rdoc/generator/template/darkfish/js/darkfish.js
+++ b/lib/rdoc/generator/template/darkfish/js/darkfish.js
@@ -99,7 +99,7 @@ function hookSidebar() {
navigationToggle.ariaExpanded = navigationToggle.ariaExpanded !== 'true';
});
- var isSmallViewport = window.matchMedia("(max-width: 1024px)").matches;
+ var isSmallViewport = window.matchMedia("(max-width: 1023px)").matches;
if (isSmallViewport) {
navigation.hidden = true;
navigationToggle.ariaExpanded = false;