This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
beforematch: what to do when the element is no longer matching after callback. #150
Comments
Some thoughts:
|
josepharhar
added a commit
to josepharhar/display-locking
that referenced
this issue
Apr 24, 2020
I made this to address this code review comment: https://chromium-review.googlesource.com/c/chromium/src/+/2068873/21#message-93c7132faae9655a9a22e6b38ed73ff90315d6cb This information is very relevant to this bug where we will try to decide on what the scrolling behavior should be: WICG#150
I documented a bunch of current scrolling behavior here: #154 Another thought brought up in the PR: When we choose to scroll to a different element due to DOM/style changes in the beforematch handler, should said different element also get a beforematch event? |
1 task
Some more thoughts from @vmpstr: We should continue to fire events when the element we are trying to scroll to is changing, but we should limit it to like 10 to prevent infinite loops |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Beforematch puts in a script callback before we scroll to whatever caused us to fire the signal (scroll-to-text, find-in-page, or fragment link navigation).
The question is what should we do if the conditions that caused us to find the match no longer hold after beforematch runs.
For example, in find-in-page case, the callback can:
We need to know how to handle all of those. Hopefully, whatever the decision, we can apply to other situations that we might not have thought of yet.
/cc @josepharhar @chrishtr @domenic
The text was updated successfully, but these errors were encountered: