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
Feature detection should not set scrollLeft coordinate to a positive value #6
Comments
I would like to upgrade the code. |
@othree Thanks. Right, we will need to tell websites to upgrade to the new code and that's not going to be easy, but obviously it's easier if the upstream code is fixed first. (I believe we had similar issues in the past with smoothscroll.js using document.body instead of document.documentElement to scroll the page). |
The Chromium community is moving to standard behavior from the CSSOM specification [1]. In order to launch the feature and analyze potential broken URLs, they are counting pages setting the scrollLeft of a RTL scroller to a positive value. Websites using the current version of jquery.rtl-scroll will trigger the counter [2]. In order to workaround that issue, rely on Element.scrollIntoView() instead. This patch also replaces text with divs and removes scrollbar from the scroller, in order to make measurements more reliable. [1] https://www.chromestatus.com/feature/5759578031521792 [2] othree#6
scrollIntoView() might scroll the page, so make things safer by wrapping into a 'position: fixed' scroller. othree#6
I guess this can be closed now. |
As part of Chromium web interoperability effort, we are trying to address these inconcistencies by switching to the standard "negative" type ( see https://www.chromestatus.com/feature/5759578031521792 ). In particular, we are trying to measure websites using non-standard "default" type that could potentially be broken by this behavior change. For that purpose, we analyze web pages setting scroll coordinates to positive values (when they are really expected to be nonpositive).
This library is a nice way to feature detect scroll inconsistencies between browsers but it is causing websites to trigger our use counters because of the operation
definer.scrollLeft = 1;
. Can you please modify it to instead rely on scrollIntoView() instead?Here is an example:
https://people.igalia.com/fwang/scrollable-elements-in-non-default-writing-modes/scroll-coordinates-behavior.js
The text was updated successfully, but these errors were encountered: