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

fix~issues 1110 #1111

merged 9 commits into from
May 14, 2020

Conversation

CHU295
Copy link
Contributor

@CHU295 CHU295 commented Apr 10, 2020

Summary
fix #1110

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:


  • DO NOT include files inside lib directory.

Comment on lines 174 to 178
// Docsify.dom.on(
// $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.

Why this :?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix this bug
#1098

in most cases, the element that triggers the click event is not tag A .
At this time, stopPropagation event causing click the search results on the left, the right page cannot be located.
In your source code, the location is triggered by listening to the click event

Copy link
Member

@trusktr trusktr May 13, 2020

Choose a reason for hiding this comment

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

Oh I see. I wonder why that was there though. Why did it want to prevent clicks on non-anchor tags? EDIT: nevermind, I see @sy-records's comment.

@anikethsaha anikethsaha requested review from a team, trusktr and Koooooo-7 and removed request for a team April 13, 2020 08:02
Copy link
Member

@Koooooo-7 Koooooo-7 left a comment

Choose a reason for hiding this comment

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

Could you give more details about ur changes?
Removing the unnecessary code and showing some test results is better.

@sy-records
Copy link
Member

image
Did this change the file name?

Copy link
Member

@sy-records sy-records left a comment

Choose a reason for hiding this comment

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

It's okay now, I tested without problems.

Comment on lines 174 to 178
Docsify.dom.on(
$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

@sy-records sy-records self-requested a review May 13, 2020 06:07
@@ -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.

@sy-records
Copy link
Member

@docsifyjs/reviewers We can remove the modified component.js and use this PR to fix #1110.

@anikethsaha
Copy link
Member

cc @CHU295 can you change the PR to fix #1110

@sy-records sy-records changed the title fix~issues 1098、1110 fix~issues 1110 May 14, 2020
@sy-records
Copy link
Member

@anikethsaha I modified it for him.

@anikethsaha anikethsaha merged commit 708ca9d into docsifyjs:develop May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read property 'contains' of undefined
5 participants