Commit aa5bee1
Fix version selector in responsive design (#345)
When the nav is hidden by default at narrow page widths, you can view
the nav by clicking an icon.
When the nav is opened and visible you can click links in the nav to
move between pages.
However, the `onClick` events for the version selector do not work. I
traced this to another event that was taking priority, which was that
any click anywhere in the html triggered the nav to close. Anywhere
except links to other pages, which always fire first.
This PR modifies the showNav function so that the nav is hidden if you
click outside the nav, but not in the nav. This means that the version
selector can be used.
Note that depending on the screen resolution it is not actually possible
to click outside the nav, because the nav fills the display area.
---------
Co-authored-by: Stefano Ottolenghi <stefano.ottolenghi@neo4j.com>1 parent 0aea703 commit aa5bee1
File tree
1 file changed
+1
-1
lines changed- src/js
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
0 commit comments