Auto scroll

An optional package that enables automatic scrolling during a drag operation

3.2.1

Patch Changes

  • Updated dependencies

3.2.0

Minor Changes

Patch Changes

  • Updated dependencies

3.1.0

Minor Changes

3.0.1

Patch Changes

  • Updated dependencies

3.0.0

Major Changes

  • f2dc9097319f0, (opens new window) - ### Dropped support for legacy Typescript 4 types. Typescript 5 is now the new minimum.

    Removes the typesVersions property and dist/types-ts4.5 directory from the dist.

    Types are now exclusively via the "types": "dist/types/index.d.ts" property.

    - "typesVersions": { - ">=4.5 <4.9": { - "*": [ - "dist/types-ts4.5/*", - "dist/types-ts4.5/index.d.ts" - ] - } - },

Patch Changes

  • Updated dependencies

2.1.5

Patch Changes

2.1.4

Patch Changes

2.1.3

Patch Changes

2.1.2

Patch Changes

2.1.1

Patch Changes

  • #164244, (opens new window) 65021fc0267e2, (opens new window) - The cleanup functions returned by the following utilities now only work on the first call. This was done to prevent unexpected side effects of calling a cleanup function multiple times.

    • @atlaskit/pragmatic-drag-and-drop/adapter/element
      • draggable
      • dropTargetForElements
      • monitorForElements
    • @atlaskit/pragmatic-drag-and-drop/adapter/text-selection
      • dropTargetForTextSelection
      • monitorForTextSelection
    • @atlaskit/pragmatic-drag-and-drop/adapter/external
      • dropTargetForExternal
      • monitorForExternal
    • @atlaskit/pragmatic-drag-and-drop-auto-scroll/element
      • autoScrollForElements
      • autoScrollWindowForElements
    • @atlaskit/pragmatic-drag-and-drop-auto-scroll/external
      • autoScrollForExternal
      • autoScrollWindowForExternal
    • @atlaskit/pragmatic-drag-and-drop-auto-scroll/text-selection
      • autoScrollForTextSelection
      • autoScrollWindowForTextSelection
  • Updated dependencies

2.1.0

Minor Changes

2.0.0

Major Changes

  • #170839, (opens new window) 1534389dcb75b, (opens new window) - In order to improve clarity, we have renamed the from*Edge (eg fromTopEdge) argument properties to for*Edge (eg forTopEdge) for the overflow scroller. If you are not using overflow scrolling, there is nothing you need to do.

    - fromTopEdge + forTopEdge - fromRightEdge + forRightEdge - fromBottomEdge + forBottomEdge - fromLeftEdge + forLeftEdge const unbind = unsafeOverflowAutoScrollForElements({ element, getOverflow: () => ({ - fromTopEdge: { + forTopEdge: { top: 6000, right: 6000, left: 6000, }, - fromRightEdge: { + forRightEdge: { top: 6000, right: 6000, bottom: 6000, }, - fromBottomEdge: { + forBottomEdge: { right: 6000, bottom: 6000, left: 6000, }, - fromLeftEdge: { + forLeftEdge: { top: 6000, left: 6000, bottom: 6000, }, }), });

    We thought that for* more accurately represented what was being provided, as these are the overflow definitions for a defined edge.

    We have also improved the types for for*Edge so that you do not need to provide redundant cross axis information if you only want to overflow scroll on the main axis.

    const unbind = unsafeOverflowAutoScrollForElements({ element, getOverflow: () => ({ forTopEdge: { top: 100, + // no longer need to pass `0` for the cross axis if you don't need it - right: 0, - left: 0, }, forRightEdge: { right: 100, - top: 0, - bottom: 0, }, forBottomEdge: { bottom: 100, - right: 0, - left: 0, }, forLeftEdge: { left: 100, - top: 0, - bottom: 0, }, }), });

    When declaring overflow scrolling for an edge, you cannot provide how deep the scrolling should occur into the element (that is defined by the "over element" overflow scroller). Providing redundant information for an edge will now also give a type error rather than providing no feedback.

    const unbind = unsafeOverflowAutoScrollForElements({ element, getOverflow: () => ({ forTopEdge: { top: 100, bottom: 30, // ❌ now a type error }, forRightEdge: { right: 100, left: 10, // ❌ now a type error }, forBottomEdge: { bottom: 100, top: 200, // ❌ now a type error }, forLeftEdge: { left: 100, right: 20, // ❌ now a type error }, }), });

1.4.0

Minor Changes

  • #116572, (opens new window) 98c65e7ff719c, (opens new window) - 🍯 Introducing "the honey pot fix" which is an improved workaround for a painful browser bug, (opens new window).

    Background

    The browser bug causes the browser to think the users pointer is continually depressed at the point that the user started a drag. This could lead to incorrect events being triggered, and incorrect styles being applied to elements that the user is not currently over during a drag.

    Outcomes

    • Elements will no longer receive MouseEvents (eg "mouseenter" and "mouseleave") during a drag (which is a violation of the drag and drop specification, (opens new window))
    • Elements will no longer apply :hover or :active styles during a drag. Previously consumers would need to disable these style rules during a drag to prevent these styles being applied.
    • Dramatically improved post drop performance. Our prior solution could require a noticeable delay due to a large style recalculation after a drop.

Patch Changes

  • Updated dependencies

1.3.0

Minor Changes

  • #95426, (opens new window) a58266bf88e6, (opens new window) - Adding axis locking functionality

    + // `getAllowedAxis` added to element, text selection and external auto scrollers autoScrollForElements({ element: myElement, + getAllowedAxis: (args: ElementGetFeedbackArgs<DragType>) => 'horizontal' | 'vertical' | 'all', }); autoScrollWindowForElements({ + getAllowedAxis: (args: WindowGetFeedbackArgs<DragType>) => 'horizontal' | 'vertical' | 'all', }); unsafeOverflowAutoScrollForElements({ + getAllowedAxis?: (args: ElementGetFeedbackArgs<DragType>) => AllowedAxis; })

1.2.0

Minor Changes

1.2.0 is deprecated on npm and should not be used. Shortly after release we decided to change this API

1.1.0

Minor Changes

  • #94454, (opens new window) 4b40eb010074, (opens new window) - Exposing the unsafe overflow auto scroller for external drags (unsafeOverflowAutoScrollForExternal()). This already existed, but it was not exposed publicly 🤦‍♂️.

    import {unsafeOverflowAutoScrollForElements from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/element'; import {unsafeOverflowAutoScrollForTextSelection} from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/text-selection'; + import {unsafeOverflowAutoScrollForExternal} from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/unsafe-overflow/external';

1.0.4

Patch Changes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

Patch Changes

  • Updated dependencies

0.8.1

Patch Changes

  • Updated dependencies

0.8.0

Minor Changes

  • #57337, (opens new window) 4ad3fa749a5c, (opens new window) - Adding the ability to increase the maximum automatic scroll speed.

    autoScrollForElements({ element: myElement, + getConfiguration: () => ({maxScrollSpeed: 'fast' | 'standard'}), })

    getConfiguration() is a new optional argument be used with all auto scrolling registration functions:

    • autoScrollForElements
    • autoScrollWindowForElements
    • autoScrollForFiles
    • autoScrollWindowForFiles
    • unsafeOverflowForElements
    • unsafeOverflowForFiles
    autoScrollForElements({ element: myElement, getConfiguration: () => ({ maxScrollSpeed : 'fast' }) }),

    We recommend using the default "standard" max scroll speed for most experiences. However, on some larger experiences, a faster max scroll speed ("fast") can feel better.

0.7.0

Minor Changes

0.6.0

Minor Changes

  • #42668, (opens new window) 0a4e3f44ba3, (opens new window) - We have landed a few fixes for "overflow scrolling"
    • Fix: Time dampening could be incorrectly reset when transitioning from "over element" auto scrolling to "overflow" auto scrolling for certain element configurations.
    • Fix: Parent "overflow scrolling" registrations could prevent overflow scrolling on children elements, if the parent was registered first.
    • Fix: "overflow scrolling" canScroll() => false would incorrectly opt out of "overflow scrolling" for younger registrations.

0.5.0

Minor Changes

Patch Changes

  • Updated dependencies

0.4.0

Minor Changes

0.3.2

Patch Changes

  • Updated dependencies

0.3.1

Patch Changes

  • Updated dependencies

0.3.0

Minor Changes

0.2.0

Minor Changes

0.1.0

Minor Changes

Patch Changes

  • Updated dependencies
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License