Skip to content
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~issues 1110 #1111

Merged
merged 9 commits into from
May 14, 2020
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core/event/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export function collapse(el) {
if (
target.nodeName === 'A' &&
target.nextSibling &&
target.nextSibling.classList &&
target.nextSibling.classList.contains('app-sub-sidebar')
) {
dom.toggleClass(target.parentNode, 'collapse');
Expand Down
5 changes: 0 additions & 5 deletions src/plugins/search/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,6 @@ function bindEvents() {

let timeId;
// Prevent to Fold sidebar
Docsify.dom.on(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After deletion, the sidebar will be collapsed when using search on the mobile end, making search unavailable.

$search,
'click',
e => e.target.tagName !== 'A' && e.stopPropagation()
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you comment this instead of delete. also add why this is being commented.
use block comments (/** ... */)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

He said here #1111 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, this is just for future reference. we can add a link to this PR instead of details.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I tested the mobile end and he'll affect the sidebar.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you share the details in a separate review so that he can take a look

Docsify.dom.on($input, 'input', e => {
clearTimeout(timeId);
timeId = setTimeout(_ => doSearch(e.target.value.trim()), 100);
Expand Down