-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix sidebar closing problem on mobile while clicking among catalog items #1564
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/docsify-core/docsify-preview/FSi83wev1QmMp7yjcM3tYHnNwNYo |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 35cd3c1:
|
details description of problem: Under mobile mode, any click on one of the catalog items will causing sidebar closing. |
Can you add tests to it? |
I'd like to add tests. Do you mean by attaching pictures? screen shot: after fix the bug using chrome on iphone |
This change solves one problem (for some) while introducing a new problem (for everyone): the sidebar menu no longer auto-closes when new content is loaded. This means all users will be forced to manually close the sidebar after navigating to a new page. While some may prefer this behavior, it is not safe to assume everyone will. The correct way to address this issue is by adding support for expand/collapse toggles in the sidebar that exist only to hide/show content. Docsify does not support this today, but there are relative easy ways to implement it. For example: * Text Heading (no expand/collapse)
* [Page 1](page1.md)
* [Page 2](page2.md)
+ Toggle Heading (click to expand)
+ [Page 1](page1.md)
+ [Page 2](page2.md)
- Toggle Heading (click to collapse)
- [Page 1](page1.md)
- [Page 2](page2.md) Text Heading This can all be done by modifying the markdown parser's handling of There are multiple open requests for official expand/collapse toggle solution in the sidebar: #728, #900, #1181, #1200. closing this PR in favor of those. |
@jhildenbiddle @sy-records |
Summary
What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
Tested in the following browsers: