Skip to content

Commit 1794e59

Browse files
authored
Fix iPad Pro navigation not shown (#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.
1 parent d1cb9dc commit 1794e59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rdoc/generator/template/darkfish/js/darkfish.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ function hookSidebar() {
9999
navigationToggle.ariaExpanded = navigationToggle.ariaExpanded !== 'true';
100100
});
101101

102-
var isSmallViewport = window.matchMedia("(max-width: 1024px)").matches;
102+
var isSmallViewport = window.matchMedia("(max-width: 1023px)").matches;
103103
if (isSmallViewport) {
104104
navigation.hidden = true;
105105
navigationToggle.ariaExpanded = false;

0 commit comments

Comments
 (0)