I have a use case for smooth scrolling: I show log file text (potentially many lines) in a container, along with a sort of index alongside. When a user clicks an entry in the index, we scroll to a given line in the log text. This is a natural use case for smooth scrolling as provided in the CSSOM View Module: I want to scroll to the appropriate line while giving the user context as to where the new scroll position is relative to the original position. However, if the new scroll position is on a line far down the document from the current scroll position, the smooth scroll operation can take several seconds to complete in Chrome.
I’d like to propose something like a
duration property be added to
ScrollOptions to allow a developer to cap the amount of time the user agent spends scrolling to the destination.
Does anyone know if this is against any original design tenet of “smooth” scrolling in this spec? I understand from this conversation that we want to honor the system’s scroll style that the user is presumably used to, but I think my example above demonstrates bad UX.