Docs: Text Selection Needs Improvement
What is the improvement or update you wish to see?
When starting text selection from the left edge of the content, text selection does not work as intended and selects the entire post instead.
This is happening because the post does not have sufficient horizontal padding.
See this video: https://imgur.com/a/Vl6Plrd
Solution is simple, just add horizontal padding on the post's container to avoid this issue ( also shown in video above )
This issue is on all pages of /learn and /docs
Is there any context that might help us understand?
When taking notes of NextJS features, User of the website needs to make a lot of text selections. This UI issue is very annoying for the user
Does the docs page already exist? Please link to it.
https://nextjs.org/learn/basics/data-fetching/getstaticprops-details
This issue appears to be an issue with the nextjs.org site, and not with the documentation here. I've gone in and attempted to locate where the code is that pulls in the .md files into the guides pages, but it appears to not be in this repository.
That being said this issue is quite minor, and should not take too long to resolve. The problem is that the sidebar on the documentation pages has padding and margin right, which results in any selection starting in the white space to begin in the sidebar element, instead of the expected selection of the body content. This can be resolved by removing spacing on the sidebar, and adding it as padding left on the .docs class.
tl;dr
- Issue cannot be resolved in this repo.
- Issue can be resolved by removing padding/margin right from the
.sidebarelement and adding padding-left of 3rem to the.docselement.
If a project maintainer could pass this along to the proper channels, or let me know if I missed something and can resolve/communicate this issue on my own I would appreciate it.
@balazsorban44 if I have missed something please let me know. I will try to resolve it on my own if I can.
This is still an issue even on the next Next.js docs site. I just submitted an internal PR to address. Great suggestion!
PR was merged! Happy better doc selection! Appreciate you suggesting it.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.