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 scrolling in docs #7982

Merged
merged 4 commits into from
Feb 8, 2022
Merged

Conversation

Falke-Design
Copy link
Member

Scrolling to the anchor is now be done manually instead of the browser internal function.

Fixes #7971
Closes #7972

Chromium browsers have a weird sideeffect. If we scroll to the same anchor in chromium browsers again, the scroll position has changed and the height of the sticky anchor was subtracted from the total scroll height / scroll position

@Malvoz, @NICEXAI, @avioli please check Demo

@Falke-Design Falke-Design added the docs Improvements or additions to documentation label Feb 7, 2022
@NICEXAI
Copy link

NICEXAI commented Feb 7, 2022

Nice, this is a good way.

@Malvoz
Copy link
Member

Malvoz commented Feb 7, 2022

Looks really good! Can this z-index:

z-index: 1;

that was introduces in #7703 be removed now? It seems to cause the following on mobile:

Edit: The black border disappears if that z-index is removed, perhaps the TOC can instead have a z-index: 2?

Copy link
Member

@Malvoz Malvoz left a comment

Choose a reason for hiding this comment

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

LGTM. Let's not block on #7982 (comment). Mobile has other issues (sticky headings not showing at all), they can be discussed separately.

@Falke-Design
Copy link
Member Author

Falke-Design commented Feb 7, 2022

No removing z-index: 1 is no option look, the "Extension methods" below TileLayer:
grafik

But it works with adding z-index: 1 to #toc-copy I will change this tomorrow

@IvanSanchez IvanSanchez merged commit 178925b into Leaflet:main Feb 8, 2022
@Falke-Design Falke-Design deleted the fix/docs-anchor branch February 8, 2022 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document positioning error within the API document by clicking on the sidebar button
4 participants