Interface ScrollingBehavior


public interface ScrollingBehavior

Understanding scroll behavior

Some UI frameworks automatically scroll elements into view before interacting with them. If components redraw during scroll (e.g., to render new list rows), the DOM may change mid-interaction.

Best practices

  • Ensure the target is already in view before triggering actions.
  • Use programmatic scrolling when needed to position elements predictably.
  • Account for custom scrollbars, which may require using framework-specific scrolling APIs rather than native browser scroll methods.