-
Notifications
You must be signed in to change notification settings - Fork 44
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
Clarify how scroll to fragment is performed #66
Comments
@fred-wang WDYT of the updated indicated part of the document handling in #67? I think it'd make sense to standardize/clean-up |
OK, I took a look at the new text and the behavior now seems well-defined to me. At least I didn't find any obvious gap that prevents implementing it. Thanks for doing that change! Maybe one possible addition could be to extend ScrollIntoViewOptions or ScrollOptions with a boolean "highlight" parameter, so that the CSSOM would take care of https://wicg.github.io/ScrollToTextFragment/#indicating-the-text-match
Right, I mentioned window.find because there was already an issue request for that but I'm happy with enhancing scrolIntoView. This is maybe even better since that one already has a spec/testsuite and is already used by HTML5. I guess web developers asking for window.find would find this addition useful to implement a polyfill. I'll reply on the blink-dev thread. |
https://wicg.github.io/ScrollToTextFragment/#navigating-to-text-fragment defers to HTML5 in order to perform the scroll to the fragment.
https://html.spec.whatwg.org/multipage/browsing-the-web.html#scroll-to-the-fragment-identifier assumes that the indicated part of the document is an Element and then defers to CSSOMView.
However, https://wicg.github.io/ScrollToTextFragment/#find-a-target-text returns a Range.
Maybe what is wanted instead is to rely on window.find() but this is not standardized. See whatwg/html#3539
The text was updated successfully, but these errors were encountered: