react-custom-scrollbars icon indicating copy to clipboard operation
react-custom-scrollbars copied to clipboard

https://github.com/malte-wessel/react-custom-scrollbars/issues/41#issue-148316547

Open AluDevelopment opened this issue 5 years ago • 0 comments

https://github.com/malte-wessel/react-custom-scrollbars/issues/41#issue-148316547

Clicking on anchor links (e.g.<a href="#link"/>) causes a call of element.scrollIntoView() on target. But scrollIntoView scrolls to top all ancestors of the target, which have content height greater than element height. So here we have our problem, as we have first wrapper div to have height of 100% and the second inner one to be 100% + 15px (because of negative margins for hiding native scrollbars, number 15 may vary). The first wrapper div scrolls by 15px, moving the content and leaving the gap at the bottom which is unacceptable.

image

Originally posted by @AluDevelopment in https://github.com/malte-wessel/react-custom-scrollbars/issues/41#issuecomment-572853386

AluDevelopment avatar Jan 10 '20 03:01 AluDevelopment