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

LibWeb/HTML: Scroll to the fragment before loading the document #3258

Conversation

shannonbooth
Copy link
Contributor

@shannonbooth shannonbooth commented Jan 15, 2025

Otherwise nowhere ends up scrolling to the fragment specified by the
fragment in document's URL. This fixes ladybird scrolling to the
correct location in the document when navigating to a link that
has a fragment, e.g:

https://html.spec.whatwg.org/multipage/browsing-the-web.html#try-to-scroll-to-the-fragment

As well as use of the :target selector.

@shannonbooth shannonbooth marked this pull request as draft January 15, 2025 05:08
@shannonbooth shannonbooth force-pushed the scroll-to-fragment-before-document-load branch from f4cf6c4 to 8bed2ad Compare January 15, 2025 05:22
@shannonbooth shannonbooth force-pushed the scroll-to-fragment-before-document-load branch from 8bed2ad to e3bb4b4 Compare January 15, 2025 05:42
@shannonbooth shannonbooth marked this pull request as ready for review January 15, 2025 06:57
@shannonbooth shannonbooth force-pushed the scroll-to-fragment-before-document-load branch from e3bb4b4 to 5cb91d4 Compare January 15, 2025 07:50
Otherwise nowhere ends up scrolling to the fragment specified by the
fragment in document's URL. This fixes ladybird scrolling to the
correct location in the document when navigating to a link that
has a fragment, e.g:

https://html.spec.whatwg.org/multipage/browsing-the-web.html#try-to-scroll-to-the-fragment

As well as use of the :target selector.
@shannonbooth shannonbooth force-pushed the scroll-to-fragment-before-document-load branch from 5cb91d4 to 07d3197 Compare January 15, 2025 07:51
@AtkinsSJ AtkinsSJ merged commit 5110225 into LadybirdBrowser:master Jan 15, 2025
7 checks passed
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.

3 participants