You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The definition of scrollTop and scrollLeft could be interpreted as requiring a negative sign in the normal case, although probably not, given that it says "distance" rather than "location" or "offset", since it's described as from the visual viewport to the layout viewport (rather than the other way around).
However, I'm not 100% sure that we can promise that it always should be a nonnegative number, e.g., with touch overscrolling.
This makes me think that it should be described as an offset or location, but with the "from" and the "to" swapped from the way they currently are.
In Chrome's viewport architecture, the visual viewport is always contained within the layout viewport, which is why scrollTop and scrollLeft will always be non-negative (I believe even with touch overscrolling). Though, this may not be the case for other vendors, so I agree that we should avoid using "distance" and use position or offset with the "from" and "to" swapped. Thanks for bringing this up!
The definition of
scrollTop
andscrollLeft
could be interpreted as requiring a negative sign in the normal case, although probably not, given that it says "distance" rather than "location" or "offset", since it's described as from the visual viewport to the layout viewport (rather than the other way around).However, I'm not 100% sure that we can promise that it always should be a nonnegative number, e.g., with touch overscrolling.
This makes me think that it should be described as an offset or location, but with the "from" and the "to" swapped from the way they currently are.
Noticed while reviewing the spec for w3ctag/design-reviews#128 .
The text was updated successfully, but these errors were encountered: