-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[docs] Improve table of contents cmd+click #18765
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just relying on `findActiveIndex` seems to be enough. This code would activate items when cmd+clicked (or middle click) without scrolling. This logic seems to be unnecessary.
Details of bundle changes.Comparing: 3199e0d...5617f0f
|
The logic was added to work around edges: try https://deploy-preview-18765--material-ui.netlify.com/components/checkboxes/#api and click on the "API" anchor. I would prefer that we ignore these cmd+click events instead: Also, I'm wondering if we shouldn't follow react-router link logic rather than next.js link logic |
oliviertassinari
changed the title
[Docs] fix item activation on cmd+click
[docs] Fix item activation on cmd+click
Dec 9, 2019
2 tasks
oliviertassinari
changed the title
[docs] Fix item activation on cmd+click
[docs] Improve table of contents cmd+click
Dec 9, 2019
oliviertassinari
approved these changes
Dec 10, 2019
@Janpot Thanks for the attention to the details :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #18756
Just relying on
findActiveIndex
seems to be enough. This code would activate items when cmd+clicked (or middle click) without scrolling.Alternatively we could pass the click event and check for
.metaKey
and middle mouse button, but that seems overly complex to me.