-
#2076
e00be08Thanks @timagixe! - Avoid requiring ResizeObserver at import time when importing @dnd-kit/dom/modifiers in DOM-like test environments. -
Updated dependencies []:
- @dnd-kit/abstract@0.5.1
- @dnd-kit/collision@0.5.1
- @dnd-kit/geometry@0.5.1
- @dnd-kit/state@0.5.1
-
#2046
f23afe0Thanks @aidenfoxx! - Updated OptimisticSortingPlugin to support non-contiguous sortable indexes. -
#2058
2dd8d0eThanks @timagixe! - AllowuseSortable,createSortableandSortableto disable dragging and dropping independently with adisabledobject while preserving the existing boolean behavior.
-
#2057
e25b1b1Thanks @timagixe! - Allow pointer dragging from descendants of interactive draggable elements, such as text inside sortable anchor elements. -
#2020
00fd955Thanks @namgi2386! - Fix DragOverlay flickering after drop -
#2079
e4792f3Thanks @silence717! - FixTypeError: Cannot read properties of undefined (reading 'split')inparseScale/parseTranslateon browsers that do not support the individualscale/translateCSS transform properties (Chromium < 104), wheregetComputedStylereturnsundefinedinstead of'none'. -
Updated dependencies [
e4d1a7e]:- @dnd-kit/abstract@0.5.0
- @dnd-kit/collision@0.5.0
- @dnd-kit/geometry@0.5.0
- @dnd-kit/state@0.5.0
-
#1909
87bf1e6Thanks @clauderic! - Addaccelerationandthresholdoptions to theAutoScrollerplugin.accelerationcontrols the base scroll speed multiplier (default:25).thresholdcontrols the percentage of container dimensions that defines the scroll activation zone (default:0.2). Accepts a single number for both axes or{ x, y }for per-axis control. Setting an axis to0disables auto-scrolling on that axis.
AutoScroller.configure({ acceleration: 15, threshold: {x: 0, y: 0.3}, });
-
#1966
521f760Thanks @lixiaoyan! - Sortablepluginsnow acceptsCustomizable<Plugins>, allowing a function that receives the default plugins to extend them rather than replace them.This prevents accidentally losing the default Sortable plugins (
SortableKeyboardPlugin,OptimisticSortingPlugin) when adding per-entity plugin configuration such asFeedback.configure().// Extend defaults useSortable({ id: 'item', index: 0, plugins: (defaults) => [ ...defaults, Feedback.configure({feedback: 'clone'}), ], }); // Replace defaults (same behavior as before) useSortable({ id: 'item', index: 0, plugins: [MyPlugin], });
-
#1938
c001272Thanks @clauderic! - TheDropAnimationFunctioncontext now includessource, providing access to the draggable entity for conditional animation logic.Feedback.configure({ dropAnimation: async (context) => { if (context.source.type === 'service-draggable') return; // custom animation... }, });
-
#1923
cde61e4Thanks @clauderic! - Batch entity identity changes to prevent collision oscillation during virtualized sorting.When entities swap ids (e.g. as
react-windowrecycles DOM nodes during a drag), multiple registry updates could fire in an interleaved order, causing the collision detector to momentarily see stale or duplicate entries and oscillate between targets.Entity
idchanges are now deferred to a microtask and flushed atomically in a singlebatch(), ensuring:- The collision notifier skips detection while id changes are pending
- The registry cleans up ghost registrations (stale keys left behind after an id swap)
-
#2001
78af13bThanks @lixiaoyan! - Support a callback form for thefeedbackoption in theFeedbackplugin, allowing the feedback type to be chosen dynamically based on the source and manager context (e.g. activator type).Feedback.configure({ feedback: (source, manager) => { return isKeyboardEvent(manager.dragOperation.activatorEvent) ? 'clone' : 'default'; }, });
-
#1908
1328af8Thanks @clauderic! - AddkeyboardTransitionoption to theFeedbackplugin for customizing or disabling the CSS transition applied when moving elements via keyboard.By default, keyboard-driven moves animate with
250ms cubic-bezier(0.25, 1, 0.5, 1). You can now customize thedurationandeasing, or set the option tonullto disable the transition entirely.Feedback.configure({ keyboardTransition: {duration: 150, easing: 'ease-out'}, });
-
#1919
bfff7deThanks @clauderic! - The Feedback plugin now supports full CSStransformproperty for compatibility with libraries like react-window v2 that position elements via transforms. Transform-related CSS transitions are filtered out to prevent conflicts with Feedback-managed properties. The ResizeObserver computes shapes from CSS values rather than re-measuring the element, avoiding mid-transition measurement errors. Sortable'sanimate()cancels CSS transitions on transform-related properties before measuring to ensure correct FLIP deltas. -
#1915
9b24dffThanks @clauderic! - Redesign event type system to follow the DOM EventMap pattern. IntroducesDragDropEventMapfor event object types andDragDropEventHandlersfor event handler signatures, replacing the ambiguously namedDragDropEvents. Event type aliases (CollisionEvent,DragStartEvent, etc.) now derive directly fromDragDropEventMaprather than usingParameters<>extraction.DragDropEventshas been split into two types:DragDropEventMap— maps event names to event object types (likeWindowEventMap)DragDropEventHandlers— maps event names to(event, manager) => voidhandler signatures
- If you were importing
DragDropEventsto type event objects, useDragDropEventMapinstead:// Before type MyEvent = Parameters<DragDropEvents<D, P, M>['dragend']>[0]; // After type MyEvent = DragDropEventMap<D, P, M>['dragend'];
- If you were importing
DragDropEventsto type event handlers, useDragDropEventHandlersinstead:// Before const handler: DragDropEvents<D, P, M>['dragend'] = (event, manager) => {}; // After const handler: DragDropEventHandlers<D, P, M>['dragend'] = ( event, manager ) => {};
- The
DragDropEventsre-export from@dnd-kit/reactand@dnd-kit/solidhas been removed. ImportDragDropEventMaporDragDropEventHandlersfrom@dnd-kit/abstractdirectly if needed. - Convenience aliases (
CollisionEvent,DragStartEvent,DragEndEvent, etc.) are unchanged and continue to work as before.
-
#1938
e69387dThanks @clauderic! - Added per-entity plugin configuration and movedfeedbackfrom the Draggable entity to the Feedback plugin.Draggable entities now accept a
pluginsproperty for per-entity plugin configuration, using the existingPlugin.configure()pattern. Plugins can read per-entity options viasource.pluginConfig(PluginClass).The
feedbackproperty ('default' | 'move' | 'clone' | 'none') has been moved from the Draggable entity toFeedbackOptions. Drop animation can also now be configured per-draggable.Plugins listed in an entity's
pluginsarray are auto-registered on the manager if not already present. The Sortable class now uses this generic mechanism instead of its own custom registration logic.The
feedbackproperty has been moved from the draggable/sortable hook input to per-entity Feedback plugin configuration.Before:
import {FeedbackType} from '@dnd-kit/dom'; useDraggable({id: 'item', feedback: 'clone'}); useSortable({id: 'item', index: 0, feedback: 'clone'});
After:
import {Feedback} from '@dnd-kit/dom'; useDraggable({ id: 'item', plugins: [Feedback.configure({feedback: 'clone'})], }); useSortable({ id: 'item', index: 0, plugins: (defaults) => [ ...defaults, Feedback.configure({feedback: 'clone'}), ], });
Drop animation can now be configured per-draggable:
useDraggable({ id: 'item', plugins: [Feedback.configure({feedback: 'clone', dropAnimation: null})], });
-
#1905
11ff2ebThanks @clauderic! - RenamedStyleSheetManagertoStyleInjectorand centralized CSPnonceconfiguration.The
StyleInjectorplugin now accepts anonceoption that is applied to all injected<style>elements. Thenonceoptions have been removed from theCursor,PreventSelection, andFeedbackplugin options.Before:
const manager = new DragDropManager({ plugins: (defaults) => [ ...defaults, Cursor.configure({nonce: 'abc123'}), PreventSelection.configure({nonce: 'abc123'}), ], });
After:
const manager = new DragDropManager({ plugins: (defaults) => [ ...defaults, StyleInjector.configure({nonce: 'abc123'}), ], });
The
CursorandPreventSelectionplugins now route their style injection through theStyleInjector, so all injected styles respect the centralizednonceconfiguration. -
#1916
7489265Thanks @clauderic! - RewritescrollIntoViewIfNeededwith manual offset calculations for correct behavior in nested scroll containers. ThecenterIfNeededboolean parameter has been replaced with an options object acceptingblockandinlineproperties ('center','nearest', or'none').
-
#1918
4bc7e71Thanks @clauderic! - Animation resolution now uses last-wins semantics matching CSS composite order.getFinalKeyframereturns the last matching keyframe across all running animations instead of short-circuiting on the first match.getProjectedTransformcollects the latest value per CSS property (transform,translate,scale) rather than accumulating transforms additively. -
#1948
532ae9bThanks @clauderic! - Fix Feedback plugin placeholder not repositioning when siblings are moved around a stationary source element.When a VDOM framework (e.g., Preact, Vue) reorders sibling elements during a drag operation, the source element and placeholder may remain in the DOM but no longer be adjacent. The existing
documentMutationObserveronly handled cases where the source or placeholder itself was re-added to the DOM. This adds a fallback adjacency check after processing all mutation entries, ensuring the placeholder stays next to the source element regardless of how siblings are rearranged. -
#1968
267c97cThanks @clauderic! - Fix clone feedback placeholder dropping inline SVG children during mutation sync.The element mutation observer used
innerHTMLto sync child changes from the dragged element to its placeholder. This text-based serialization loses SVG namespace information, causing inline SVG elements (e.g. icon components) to be stripped from the placeholder. The placeholder then measures with incorrect dimensions, producing a misaligned drop animation.Replaced
innerHTMLwithreplaceChildren(...element.cloneNode(true).childNodes), which performs a namespace-aware deep clone. -
#1987
462e435Thanks @clauderic! - fix: resolve DTS build errors with TypeScript 5.9 on Node 20Add explicit return type annotations to avoid
[dispose]serialization failures during declaration emit, and fixuseRefreadonly errors for React 19 type compatibility. -
#1971
8fc1962Thanks @clauderic! - Added LICENSE file to all published packages. -
#1983
88d5ef9Thanks @clauderic! - Fixed memory leak inListenersclass where thebindcleanup function did not remove entries from the internalentriesset, causing detached DOM nodes to be retained in memory. -
#1934
688e00fThanks @clauderic! - FixedsetPointerCaptureerror on touch devices caused by stale pointer activation.When a touch was released during the activation delay and followed by a quick re-touch, the pending delay timer from the first touch could fire with a stale
pointerId, causingsetPointerCaptureto throw. ThePointerSensornow properly aborts the activation controller during cleanup to cancel pending delay timers, and defensively handlessetPointerCapturefailures. -
#1953
cdaebffThanks @ImBaedin! - Fix sortable type narrowing soisSortable(event.operation.source)narrows to a sortable draggable with access toinitialIndex, and re-export the drag event type aliases from@dnd-kit/vue. -
#1946
5a2ed80Thanks @mattersj! - recalculate AutoScroller options in the effect to avoid stale data -
Updated dependencies [
cde61e4,a5935e0,462e435,9b24dff,8fc1962,8115a57,e69387d,4e35963]:- @dnd-kit/abstract@0.4.0
- @dnd-kit/collision@0.4.0
- @dnd-kit/geometry@0.4.0
- @dnd-kit/state@0.4.0
-
#1903
7260746Thanks @clauderic! - Fixed CSS cascade layer ordering so that the popover-reset styles injected by the Feedback plugin no longer override styles from CSS frameworks that use cascade layers (such as Tailwind CSS v4).The
@layerblock is now nameddnd-kitand injected via a<style>element prepended to<head>for document roots, ensuring it is declared first in the cascade with the lowest priority. Shadow DOM roots continue to useadoptedStyleSheets.If needed, consumers can explicitly control the layer ordering:
@layer dnd-kit, base, components, utilities;
-
Updated dependencies []:
- @dnd-kit/abstract@0.3.2
- @dnd-kit/collision@0.3.2
- @dnd-kit/geometry@0.3.2
- @dnd-kit/state@0.3.2
- Updated dependencies [
4341114]:- @dnd-kit/abstract@0.3.1
- @dnd-kit/collision@0.3.1
- @dnd-kit/geometry@0.3.1
- @dnd-kit/state@0.3.1
-
6a59647Thanks @clauderic! - Allowplugins,sensors, andmodifiersto accept a function that receives the defaults, making it easy to extend or configure them without replacing the entire array.// Add a plugin alongside the defaults const manager = new DragDropManager({ plugins: (defaults) => [...defaults, MyPlugin], });
// Configure a default plugin in React <DragDropProvider plugins={(defaults) => [ ...defaults, Feedback.configure({dropAnimation: null}), ]} />
Previously, passing
plugins,sensors, ormodifierswould replace the defaults entirely, requiring consumers to import and spreaddefaultPreset. The function form receives the default values as an argument, so consumers can add, remove, or configure individual entries without needing to know or maintain the full default list. -
68e44deThanks @clauderic! - AddisSortableOperationtype guard and exportSortableDraggable/SortableDroppabletypes.isSortableOperation(operation)narrows aDragOperationSnapshotso thatsourceis typed asSortableDraggableandtargetasSortableDroppable, providing typed access to sortable-specific properties likeindex,initialIndex,group, andinitialGroup.Re-exported from all framework packages (
@dnd-kit/react/sortable,@dnd-kit/vue/sortable,@dnd-kit/svelte/sortable,@dnd-kit/solid/sortable).
-
5d64078Thanks @clauderic! - AdddropAnimationprop to theDragOverlaycomponent to allow consumers to disable or customize the drop animation that plays when a drag operation ends. Set tonullto disable, pass{duration, easing}to customize timing, or provide a custom animation function for full control. -
863ce2bThanks @clauderic! - Fix auto-scroll trigger zones and boundaries during pinch-to-zoom.Updated
getViewportBoundingRectangle,getVisibleBoundingRectangle, andgetScrollPositionto use the Visual Viewport API, so that scroll detection and element visibility clipping are based on the actual visible area rather than the layout viewport. This fixes auto-scroll not triggering near the visible edges and stopping before reaching the end of scrollable content when the page is zoomed in. -
863ce2bThanks @clauderic! - Fix drag overlay and debug overlay mispositioning in Safari during pinch-to-zoom.Safari anchors
position: fixedelements to the visual viewport rather than the layout viewport during pinch-to-zoom. Added agetFixedPositionOffset()utility that compensates for this by addingvisualViewport.offsetLeft/Topto the CSSleft/topvalues of fixed-positioned overlays. -
e8ae539Thanks @clauderic! - Fix themoveandswaphelpers to support computed sortable IDs and optimistic sorting reconciliation for grouped records.When the ID-based lookup fails (e.g. when using computed IDs like
id={\sortable-${item.id}`}that don't match data items), the helpers now fall back to sortable index properties (initialIndex,index,group,initialGroup) to determine the correct positions. Additionally, grouped records now support optimistic sorting reconciliation—whensource.id === target.id` after optimistic sorting, the helpers use the sortable indices to determine the intended move.Added
initialIndex,group, andinitialGroupgetters toSortableDraggable, andindexandgroupgetters toSortableDroppable, so these properties are accessible from the operation'ssourceandtargetin drag events. -
41d7e27Thanks @rjur11! - Fixed PointerSensor crash on Android caused by unhandled pointercancel events. -
Updated dependencies [
6a59647]:- @dnd-kit/abstract@0.3.0
- @dnd-kit/collision@0.3.0
- @dnd-kit/geometry@0.3.0
- @dnd-kit/state@0.3.0
-
#1874
de27fbcThanks @clauderic! - Expose ergonomic type aliases for drag and drop event handlers:CollisionEvent,BeforeDragStartEvent,DragStartEvent,DragMoveEvent,DragOverEvent, andDragEndEvent. These types are re-exported from@dnd-kit/domand@dnd-kit/reactfor convenience. -
#1854
c2097c9Thanks @du33169! - Fixed Feedback plugin style injection in Shadow DOM (fix #1765) -
#1875
6d80680Thanks @clauderic! - Feedback plugin: Fix table cell width handling during drag operations. UsegetBoundingClientRect().widthinstead ofoffsetWidthfor sub-pixel precision, and restore original cell widths after dragging ends instead of leaving hardcoded values permanently. -
#1877
0923bc6Thanks @clauderic! - Respectprefers-reduced-motionmedia query across all animations. When the user prefers reduced motion, the following animations are disabled:- Keyboard drag move transitions (250ms translate)
- Drop animation (250ms slide-back)
- Sortable item swap transitions (250ms position shift)
-
#1876
5f1b19aThanks @clauderic! - Refactor the Feedback plugin for improved modularity and extensibility.StyleSheetManager – Introduced a new generic
CorePluginthat manages CSS stylesheet injection into document and shadow roots. Plugins can callregister(cssRules)to declare styles andaddRoot(root)to track additional roots. The manager reactively injects and cleans up adopted stylesheets as the drag operation's source and target roots change. The Feedback plugin now delegates all stylesheet management to the StyleSheetManager.Configurable drop animation – The
Feedbackplugin now accepts adropAnimationoption:- Pass
{ duration, easing }to customize the built-in animation timing - Pass a function for full custom animation control (receives context, return a promise)
- Pass
nullto disable the drop animation entirely - Omit for the default 250ms ease animation
Extracted helpers – Observer setup (
createElementMutationObserver,createDocumentMutationObserver,createResizeObserver) and the drop animation logic (runDropAnimation) are now in dedicated modules within the feedback plugin directory. - Pass
-
Updated dependencies [
de27fbc,256432d,be7cfe3]:- @dnd-kit/abstract@0.2.4
- @dnd-kit/collision@0.2.4
- @dnd-kit/geometry@0.2.4
- @dnd-kit/state@0.2.4
-
#1861
f90571dThanks @xuxucode! - Fixed a bug where customPointerSensoroptions passed to thebind()method were not being respected by theactivationConstraints()method. -
Updated dependencies []:
- @dnd-kit/abstract@0.2.3
- @dnd-kit/collision@0.2.3
- @dnd-kit/geometry@0.2.3
- @dnd-kit/state@0.2.3
-
5c80bcfThanks @clauderic! - Fixed invertedpreventActivationdefault option onKeyboardSensor -
Updated dependencies []:
- @dnd-kit/abstract@0.2.2
- @dnd-kit/collision@0.2.2
- @dnd-kit/geometry@0.2.2
- @dnd-kit/state@0.2.2
-
d7f4130Thanks @clauderic! - - Fix a bug withPointerSensor.defaults.preventActivationnot being applied if there are other sensor options provided. -
Updated dependencies []:
- @dnd-kit/abstract@0.2.1
- @dnd-kit/collision@0.2.1
- @dnd-kit/geometry@0.2.1
- @dnd-kit/state@0.2.1
-
#1821
e95a9c8Thanks @clauderic! - - RefactorPointerSensorto use the new activation primitives.- Add
PointerActivationConstraintswith composable constraints:PointerActivationConstraints.Delay({value, tolerance})PointerActivationConstraints.Distance({value, tolerance?})
- Update
PointerSensor.defaults.activationConstraints(...):- Mouse on handle: activates immediately.
- Touch: Delay 250ms with 5px tolerance.
- Text inputs: Delay 200ms with 0px tolerance.
- Other pointer types: Delay 200ms with 10px tolerance + Distance 5px.
- New utilities:
getDocuments()returns all same-origin documents (enables listening across iframes).getEventCoordinates(event)returns{x, y}from aPointerEvent.
PointerSensornow binds listeners across same-origin documents and improves default prevention during drag.- Internal cleanups: remove internal
sensors/pointer/index.tsandutilities/execution-context/index.ts(no public API impact).
These changes are additive and should be non-breaking. If you were composing pointer activation constraints, migrate to the new
PointerActivationConstraintsclasses if you were importing internal implementations. - Add
-
#1823
9849887Thanks @github-actions! - - AddpreventActivationoption toPointerSensorandKeyboardSensorto conditionally prevent sensor activation.- PointerSensor: The default
preventActivationprevents activation when the pointer target is an interactive element (input, select, textarea, button, link, or contenteditable) that is not the source element or handle. - KeyboardSensor: Renamed
shouldActivatetopreventActivationwith inverted logic—returntrueto prevent activation instead of returningtrueto allow it. - New utility:
isInteractiveElement(element)checks if an element is an interactive form control or link.
- PointerSensor: The default
- Updated dependencies [
e95a9c8]:- @dnd-kit/abstract@0.2.0
- @dnd-kit/collision@0.2.0
- @dnd-kit/geometry@0.2.0
- @dnd-kit/state@0.2.0
-
#1775
3d6219dThanks @fpronto! - Added nonce as an option for every plugin that inject styles in html -
Updated dependencies []:
- @dnd-kit/abstract@0.1.21
- @dnd-kit/collision@0.1.21
- @dnd-kit/geometry@0.1.21
- @dnd-kit/state@0.1.21
-
#1737
3ba5a90Thanks @github-actions! - Sortable: Fix bugs with reverting optimistic updates on canceleddragend -
#1737
32448ffThanks @github-actions! - Bump@preact/signals-coreto1.10.0 -
Updated dependencies [
98d4cd4,32448ff]:- @dnd-kit/state@0.1.20
- @dnd-kit/abstract@0.1.20
- @dnd-kit/collision@0.1.20
- @dnd-kit/geometry@0.1.20
-
#1735
cc7feacThanks @MateusJabour! - Fixes cleanup issue where user would be stuck in dragging mode -
Updated dependencies [
d848327]:- @dnd-kit/state@0.1.19
- @dnd-kit/abstract@0.1.19
- @dnd-kit/collision@0.1.19
- @dnd-kit/geometry@0.1.19
-
#1715
e502979Thanks @github-actions! - Improved TypeScript generics for better type safety and flexibility- Enhanced
DragDropManagerto accept generic type parameters with proper constraints, allowing for more flexible type usage while maintaining type safety - Updated
DragDropProviderto support custom generic types for draggable and droppable entities - Modified React hooks (
useDragDropManager,useDragDropMonitor,useDragOperation) to properly infer and return the correct generic types - Changed from concrete
DraggableandDroppabletypes to generic parameters constrained byDatatype
- Enhanced
-
88942beThanks @clauderic! - DOMRectangle: Fix bugs with projected transforms. -
#1715
9326d43Thanks @github-actions! - Feedback: Re-inject the feedback styles if they get removed from the DOM before theFeedbackplugin is torn down. -
#1715
7af261fThanks @github-actions! - Feedback: Fix an issue that caused styles to be removed when another instance of the Feedback plugin was torn down even if other instances of the Feedback plugin are still active. -
#1714
b9b182eThanks @clauderic! - OptimisticSortingPlugin: Fixed a bug where usingqueueMicrotaskin thedragoverevent of to check ifevent.defaultPrevented()was called by consumers was causing the order that we capture to be stale in the event that the consumer updates the order of sortable items before the micortask runs, which can happen in React for consumers usinguseOptimisticto update state optimistically. -
#1715
bb790c9Thanks @github-actions! - Feedback: Fix a regression with the drop animation on Safari. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.18
- @dnd-kit/collision@0.1.18
- @dnd-kit/geometry@0.1.18
- @dnd-kit/state@0.1.18
-
cfb94d4Thanks @clauderic! - Added atry/catchinshowPopoverandhidePopoveras theelement.matches(':popover-open')selector can throw in browsers that don't support the Popover API. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.17
- @dnd-kit/collision@0.1.17
- @dnd-kit/geometry@0.1.17
- @dnd-kit/state@0.1.17
-
#1712
93911ccThanks @github-actions! - Debug: Force the source debug elements to be re-promoted to the top of the top layer. -
#1712
0f68bb6Thanks @github-actions! - Feedback: Account for frame scale when optimistically updating feedback element shape while dragging. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.16
- @dnd-kit/collision@0.1.16
- @dnd-kit/geometry@0.1.16
- @dnd-kit/state@0.1.16
-
5539a5aThanks @clauderic! - MockResizeObserverin SSR environment. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.15
- @dnd-kit/collision@0.1.15
- @dnd-kit/geometry@0.1.15
- @dnd-kit/state@0.1.15
-
#1708
4c1e05dThanks @GuillaumeSalles! - Ensure PositionObserver recompute element rect if IntersectionObserver is scheduled in a different frame -
#1707
a97b10cThanks @github-actions! - Feedback:- Fixed a bug where the initial
translatestring was incorrectly formed, causing it not to be applied. - Fixed a bug with the placeholder ResizeObserver shape update
- Fixed a bug with the initial shape of the Feedback element when the source element unmounts and re-mounts during a drag operation
- Fixed a bug with the initial
transitionwhen setting up the Feedback element
- Fixed a bug where the initial
-
#1707
caa3273Thanks @github-actions! - PositionObserver: Fixed a bug with observing elements contained within same origin iframes. Due to limitations withIntersectionObserver, we need to also attach position observers on the containing iframe to ensure the position of elements nested withing the iframe is updated if the iframe position changes. -
#1707
cb47da3Thanks @github-actions! - DOMRectangle: Fixed a bug with projected transforms where scale was not properly being taken into account. -
#1707
f295344Thanks @github-actions! - KeyboardSensor: Delegated the responsibility of ending the drag operation when the window resizes to the Feedback plugin, as we only need to end the operation if the feedback element's window resizes, which can be different from the source element window. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.14
- @dnd-kit/collision@0.1.14
- @dnd-kit/geometry@0.1.14
- @dnd-kit/state@0.1.14
-
c46415aThanks @clauderic! - Feedback: Removedbox-sizing: border-boxfrom the default Feedback plugin styles, and account forbox-sizing: content-boxorbox-sizing: border-boxwhen setting an explicit wdith and height on the feedback element. -
#1691
382f4e2Thanks @github-actions! - Accessiblity: Fixed a bug where accesibility instructions and announcement nodes were re-created on every drag operation. -
#1691
432a0ddThanks @github-actions! - Feedback: Fix a bug where options were not properly being set on the plugin instance. -
#1689
a3496c1Thanks @GuillaumeSalles! - Ensure showPopover is not called when popover is already visible -
#1691
4a22b39Thanks @github-actions! - PointerSensor: Update default activation constraints to only allow dragging via thedelayconstraint when the activation event target is a text input to avoid interfering with potential text selections within the text input. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.13
- @dnd-kit/collision@0.1.13
- @dnd-kit/geometry@0.1.13
- @dnd-kit/state@0.1.13
-
2e0e2e2Thanks @clauderic! - ExportedCursorandPreventSelectionplugins which are used in the default preset. -
#1687
b86867bThanks @github-actions! - Addedvisibility: hiddento the::backdroppseudo element of theFeedbackplugin to ensure it is not visible on Firefox, there is a bug where it can be shown even withdisplay: nonewhen there is a backdrop filter applied to it. -
#1687
a913f5eThanks @github-actions! - Fix calls torequestAnimationFramescheduler in SSR environment -
Updated dependencies []:
- @dnd-kit/abstract@0.1.12
- @dnd-kit/collision@0.1.12
- @dnd-kit/geometry@0.1.12
- @dnd-kit/state@0.1.12
-
#1685
2370665Thanks @clauderic! - Minimize layout thrashing inScrollerandAccessibilityplugins. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.11
- @dnd-kit/collision@0.1.11
- @dnd-kit/geometry@0.1.11
- @dnd-kit/state@0.1.11
-
a0f5c44Thanks @clauderic! - Feedback: Optimistically updatedragOperation.shapewhen there are no modifiers for better performance. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.10
- @dnd-kit/collision@0.1.10
- @dnd-kit/geometry@0.1.10
- @dnd-kit/state@0.1.10
-
ffdbf52Thanks @clauderic! - Feedback: Revert moving CSS variables to the root as we noticed performance regressions in applications that have complex DOM structures. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.9
- @dnd-kit/collision@0.1.9
- @dnd-kit/geometry@0.1.9
- @dnd-kit/state@0.1.9
-
#1681
14dc059Thanks @github-actions! - Cache repeated calls togetComputedStyleswhen reading properties that are unlikely to change frequently. -
fcd9bb5Thanks @clauderic! - Moved the CSS variables to the[data-dnd-root]element, which defaults to thedocument.bodyof the source element to avoid triggeringMutationObservercallbacks every time the--dnd-translateCSS variable is updated. -
#1681
93d3c7cThanks @github-actions! - ReplaceinnerTextwithtextContentfor better performance across multiple plugins. This change improves performance sincetextContentis generally more efficient thaninnerTextas it doesn't trigger layout reflows and doesn't parse HTML entities. -
3c625d6Thanks @clauderic! - Do not use cache when getting element animations to compute projected transforms. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.8
- @dnd-kit/collision@0.1.8
- @dnd-kit/geometry@0.1.8
- @dnd-kit/state@0.1.8
-
0618852Thanks @clauderic! - Fix a regression with horizontal auto-scrolling. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.7
- @dnd-kit/collision@0.1.7
- @dnd-kit/geometry@0.1.7
- @dnd-kit/state@0.1.7
-
#1671
4f49d1bThanks @github-actions! - Improve animation handling and scheduling- Refactor Scheduler to be more flexible and generic
- Cache successive document.getAnimations() calls
- Fix bugs in Safari when projecting animations in DOMRectangle
- Fix animation handling in Feedback and Sortable components
-
#1672
b18115fThanks @GuillaumeSalles! - Improve Feedback clone performance by avoiding innerHtml reset on every mutation -
#1671
ac13c92Thanks @github-actions! - Optimize pointer move handling in PointerSensor by using the rAF scheduler to batch move events. -
Updated dependencies [
7ceb799,299389b]:- @dnd-kit/abstract@0.1.6
- @dnd-kit/state@0.1.6
- @dnd-kit/collision@0.1.6
- @dnd-kit/geometry@0.1.6
-
#1669
8fecc41Thanks @github-actions! - PointerSensor: Add support for multiple activator elements viaactivatorElementsoption to configure multiple elements that can trigger drag operations. -
#1669
a9c17dfThanks @github-actions! - FixFeedbackdrop animation in Safari by always requesting an animation frame before performing the drop animation. -
#1669
f31589aThanks @github-actions! - KeyboardSensor: Improve configuration options- Add configurable offset for keyboard movements (number or {x, y})
- Add static
defaultsandconfigureproperties for better configuration - Support different x and y offset values for
offset
-
#1669
616db17Thanks @github-actions! - Refactor PointerSensor configuration:- Partially configuring the pointer sensor no longer overrides other defaults. If you wish to override all defaults, you must explicitly set each option.
- Moved default pointer sensor configuration into to PointerSensor class.
- Add static
defaultsproperty to PointerSensor class for easier configuration and extension.
-
Updated dependencies []:
- @dnd-kit/abstract@0.1.5
- @dnd-kit/collision@0.1.5
- @dnd-kit/geometry@0.1.5
- @dnd-kit/state@0.1.5
-
b1d798dThanks @clauderic! - Fixed regressions with keyboard sorting. -
Updated dependencies []:
- @dnd-kit/abstract@0.1.4
- @dnd-kit/collision@0.1.4
- @dnd-kit/geometry@0.1.4
- @dnd-kit/state@0.1.4
-
#1663
6c9a9eaThanks @github-actions! - PointerSensor: Fixed a bug whereactions.stop()would not be invoked if the drag operation had not finished initializing. -
#1663
79c6519Thanks @github-actions! - Fix tracking of initial index and group forSortableinstances that unmount and re-mount during a drag operation. -
#1663
52c1ba3Thanks @github-actions! - Implement default renderer for DOM usingrequestAnimationFrameto ensure the browser has time to render animation frames. -
#1663
1bef872Thanks @github-actions! - Improve drag operation control by:- Introducing
AbortControllerfor better operation lifecycle management - Remove
requestAnimationFram()fromstart()action - Replacing boolean returns with proper abort control
- Ensure proper cleanup of drag operations
- Improving status handling and initialization checks
- Making feedback plugin respect operation initialization state
- Introducing
-
#1663
9a0edf6Thanks @github-actions! - Refactor Sortable store implementation to use a newWeakStoreclass- Add new
WeakStoreconstructor in@dnd-kit/statepackage - Replace Map-based store implementation in Sortable with new WeakStore utility
- Add new
-
#1663
18a7998Thanks @github-actions! - Removed unnecessary microtask in Sortable animation logic when index changes -
Updated dependencies [
8f91d91,6c9a9ea,1bef872,2522836,9a0edf6,a9db4c7]:- @dnd-kit/state@0.1.3
- @dnd-kit/abstract@0.1.3
- @dnd-kit/geometry@0.1.3
- @dnd-kit/collision@0.1.3
-
#1658
4682570Thanks @github-actions! - Fix handling of aborted drag operations across sensors. Thestartmethod now returns a boolean to indicate whether the operation was aborted, allowing sensors to properly clean up when a drag operation is prevented. This affects the Keyboard and Pointer sensors, ensuring they properly handle cases wherebeforeDragStartevents are prevented. -
#1658
f8d69b0Thanks @github-actions! - Allowactions.start()to optionally receive asourceas input. -
#1658
ee55f58Thanks @github-actions! - Refactor the drag operation system to improve code organization and maintainability:- Split
dragOperation.tsinto multiple focused files:operation.ts- Core drag operation logicstatus.ts- Status managementactions.ts- Drag actions
- Update imports and exports to reflect new file structure
- Improve type definitions and exports
- Split
-
#1660
374f81fThanks @GuillaumeSalles! - Add optionshouldActivateonKeyboardSensor. By defaultKeyboardSensoractivates if the Keyboard event is triggered from theDraggableelementorhandle.shouldActivatelet the user override this behavior. -
Updated dependencies [
ee55f58,4682570,f8d69b0,d04e9a2,ee55f58]:- @dnd-kit/state@0.1.2
- @dnd-kit/geometry@0.1.2
- @dnd-kit/abstract@0.1.2
- @dnd-kit/collision@0.1.2
-
#1656
569b6e3Thanks @github-actions! - ExportSortableKeyboardPluginandOptimisticSortingPluginfrom the sortable module to allow consumers to customize their sortable plugin configurations. -
#1655
a176848Thanks @blancham! - Fixed a bug where auto-scroll does not wotk with inverted element -
Updated dependencies [
f13cbc9]:- @dnd-kit/abstract@0.1.1
- @dnd-kit/collision@0.1.1
- @dnd-kit/geometry@0.1.1
- @dnd-kit/state@0.1.1
-
#1645
043c280Thanks @clauderic! - Add fallback logic to type-guards when instance checks fail to identify instances, for example to test if an element is anElementorHTMLElementorSVGElement, or if anAnimationEffectis aKeyframeEffect. -
#1644
ee40aacThanks @github-actions! - Feedback: Userevertinstead ofunsetto reset styles applied by thepopoverattribute. -
#1643
635d94fThanks @clauderic! - Fix a bug in theScrollerplugin that would always usedocument.getElementFromPointinstead of the document of the source element. -
#1644
0235cefThanks @github-actions! - Cursor: Ensure styles for Cursor plugin are added to the document of the draggable source element. -
#1644
1ba8700Thanks @github-actions! - Fixed a bug in thegetDocumenthelper to make it work with SVG elements. -
#1644
3080d2cThanks @github-actions! - Feedback: Setpopoverattribute value tomanual. -
Updated dependencies [
00a33c9]:- @dnd-kit/abstract@0.1.0
- @dnd-kit/collision@0.1.0
- @dnd-kit/geometry@0.1.0
- @dnd-kit/state@0.1.0
-
#1606
2c53eb9Thanks @github-actions! - Use thedraggable.isDraggingproperty instead ofdraggable.isDragSourceto setaria-grabbingandaria-pressedattributes. -
#1606
3155941Thanks @github-actions! - Fixed a bug with theFeedbackplugin where the placeholder element was visible for a brief moment during the drop animation instead of being hidden until the animation completes. -
#1606
082836eThanks @github-actions! - Fixed a bug with thePointerSensorwhere it was possible for it to activate while a drag operation was already in progress. -
Updated dependencies []:
- @dnd-kit/abstract@0.0.10
- @dnd-kit/collision@0.0.10
- @dnd-kit/geometry@0.0.10
- @dnd-kit/state@0.0.10
-
#1600
e36d954Thanks @github-actions! - AddednativeEventproperty todragstart,dragmoveanddragendevents. This can be used to distinguish user triggered events from sensor triggered events, as user or plugin triggered events will typically not have an associatedeventattached. -
#1600
bb4abcdThanks @github-actions! - Make sure the Feedback element is promoted to the top layer when synchronizing the placeholder and element position in the DOM. -
#1600
d86bbc7Thanks @github-actions! - Addedalignmentconfiguration option to draggable instances to let consumers decide how to align the draggable during the drop animation and while keyboard sorting. Defaults to the center of the target shape. -
#1600
f433fb2Thanks @github-actions! - Fixed a regression in theFeedbackplugin where the initialtranslatestyle applied to the element being dragged was not properly accounted for anymore. -
#1600
7dc0103Thanks @github-actions! - Removed some!importantrules and updated the specificity of theFeedbackplugin styles to0-2-0to make it easier for consumers to override certain styles, such aswidthandheight. -
cff3c3cThanks @clauderic! - Fixed a bug with the drop animation by usingintrinsicWidthandintrinsicHeightto determine if the width and height of the source and target differ or not rather than thewidthandheightproperties which may be transformed. -
#1600
f87d633Thanks @github-actions! - Fixed a regression introduced in0.0.7with optimistic updates not being persisted on drag end. -
860759bThanks @clauderic! - AddedintrinsicWidthandintrinsicHeightproperties onDOMRectangle, which return the intrinsic width and height of an element, before any transforms are applied. -
#1600
54e416fThanks @github-actions! - Only handledragmoveevents that have an associatedKeyboardEventas theirevent.nativeEventproperty. -
#1600
c51778dThanks @github-actions! - PointerSensor: Usecapturelistener to preventdragstartevents. -
#1600
86ed6c8Thanks @github-actions! - Fixed a regression in thePointerSensorwhere the same drag operation could fire a dragend event twice due to a race condition betweenpointerupandlostpointercapture. -
#1600
afedea9Thanks @github-actions! - PreventSelection: Remove text selection when a drag operation is initialized. -
Updated dependencies [
e36d954,60e7297,3463da1,b7f1cf8,3e629cc,8ae7014,ce31da7]:- @dnd-kit/abstract@0.0.9
- @dnd-kit/geometry@0.0.9
- @dnd-kit/collision@0.0.9
- @dnd-kit/state@0.0.9
-
#1598
0de7456Thanks @github-actions! - Moved styles that override the default user agent styles for[popover]into a CSS layer to avoid overriding other layered styles on the page, such as Tailwind 4. -
#1598
c9716cfThanks @github-actions! - AddedisDraggingandisDroppingproperties todraggableandsortableinstances. -
#1598
74eedefThanks @github-actions! - PointerSensor- End drag operation if
lostpointercaptureevent is fired and the drag operation has not ended already. This can happen if thepointerupevent is fired in a different frame. - Prevent
contextmenufrom opening during a drag operation.
- End drag operation if
-
#1598
42e7256Thanks @github-actions! - - Fixed an invalid CSS selector in thePreventSelectionplugin- Removed logic to prevent user selection in
Feedbackplugin (defer toPreventSelectionplugin to handle this)
- Removed logic to prevent user selection in
-
Updated dependencies [
c9716cf,3ea0d31,3cf4db1]:- @dnd-kit/abstract@0.0.8
- @dnd-kit/collision@0.0.8
- @dnd-kit/geometry@0.0.8
- @dnd-kit/state@0.0.8
-
#1592
550a868Thanks @github-actions! - Addedaria-grabbedto the list of attributes added by the Accessibility plugin.Setting aria-grabbed to true indicates that the element has been selected for dragging. Setting aria-grabbed to false indicates that the element can be grabbed for a drag-and-drop operation, but is not currently grabbed.
While the
aria-grabbedattribute has been deprecated in ARIA 1.1, in practice, since the accessibility API features for accessible drag and drop still don’t exist and likely won’t for several years, these attributes will continue to be supported by browsers and reflected in the accessibility tree for some years to come until a new API is introduced to replace it. -
#1592
75e23b6Thanks @github-actions! - Addedaria-grabbedandaria-pressedto the list of attributes that are not synchronized between the draggable element and its placeholder. -
#1592
cef9b46Thanks @github-actions! - Fix global modifiers set onDragDropManager/<DragDropProvider>being destroyed after the first drag operation. -
#1592
730064bThanks @github-actions! - Fix incorrect type for modifiers. -
#1592
808f184Thanks @github-actions! - Fix reconciliation of optimistic updates inmovehelper. -
#1592
c4e7a7cThanks @github-actions! - Fixed positioning ofFeedbackplugin whendirectionis set tortl. -
#1592
280b7e2Thanks @github-actions! - Fixed stale modifiers when usinguseSortable. -
#1592
84b75fcThanks @github-actions! - Fixedelementnot being set on initialization ofSortableinstance even if anelementwas provided as input. -
Updated dependencies [
c1dadef,cef9b46]:- @dnd-kit/abstract@0.0.7
- @dnd-kit/collision@0.0.7
- @dnd-kit/geometry@0.0.7
- @dnd-kit/state@0.0.7
-
#1567
081b7f2Thanks @chrisvxd! - Add source maps to output. -
#1499
d436037Thanks @chrisvxd! - Fix a bug that prevented all unique droppables that share an element from each receiving the cloned proxy. -
#1454
94920c8Thanks @github-actions! - Batch write operations todraggableanddroppable. Also ensured that droppable instance is registered before draggable instance. -
#1454
a04d3f8Thanks @github-actions! - Rework how collisions are detected and how the position of elements is observed using a newPositionObserver. -
#1454
0676276Thanks @github-actions! - Children contained in a closeddetailselement are no longer treated as visible. -
#1454
8053e4bThanks @github-actions! - AllowSortableto have a distinctelementfrom the underlyingsourceandtargetelements. This can be useful if you want the collision detection to operate on a subset of the sortable element, but the entirety of the element to move when its index changes. -
#1454
f400106Thanks @github-actions! - Improve theFeedbackplugin to better handle when the feedback element resizes during a drag operation. -
#1454
c597b3fThanks @github-actions! - IntroducerootElementoption onFeedbackplugin. -
#1454
a9798f4Thanks @github-actions! - Fix issues withinstanceofchecks in cross-window environments where thewindowof an element can differ from the execution context window. -
#1454
e70b29aThanks @github-actions! - Make sure the generic forDragDropManageris passed through toEntityso that themanagerreference on classes extendingEntityis strongly typed. -
#1454
3d0b00aThanks @github-actions! - Fix an issue where we would update the shape of sortable items while the drag operation status was idle. -
#1454
e6a8e01Thanks @github-actions! - Fix a bug withevent.preventDefault()andevent.stopPropagation()being called on pointer up even if there was no drag operation in progress, which would prevent interactive elements such as buttons from being clicked. -
#1454
7ef9864Thanks @github-actions! - Fixed bugs with theOptimisticSortingPluginwhen sorting across different groups. -
#1454
51be6dfThanks @github-actions! - Fixelementnot being set when provided on initialization ofDroppable -
#1454
fe76033Thanks @github-actions! - Fixed a bug in theKeyboardSensorthat would cause the sensor to activate when focusing elements within the sortable element other than the handle. -
#1454
62a8118Thanks @github-actions! - AddedTabto the list of default keycodes that end the current drag operation. -
#1454
0c7bf85Thanks @github-actions! - Allow theOptimisticSortingPluginto sort elements across different groups. -
#1454
f219549Thanks @github-actions! - Fix pointer events no longer being detected by thePointerSensorwhen the event target is disconnected from the DOM by setting pointer capture on the document body forpointermoveevents. -
#1454
bfc8ab2Thanks @github-actions! - PointerSensor: Defer invokingsetPointerCaptureuntil activation constraints are met as it can interfere withclickand other event handlers. Also deferred addingtouchmove,clickandkeydownevent listeners until the activation constraints are met. -
#1454
a5a556aThanks @github-actions! - Fixed React lifecycle regressions related to StrictMode. -
#1454
b5edff1Thanks @github-actions! - Removeevent.stopImmediatePropagation()inPointerSensorand replace with a different strategy to prevent other instances of PointerSensor from tracking an event that was already captured by another sensor. -
#1454
3fb972eThanks @github-actions! - AccessibilityPlugin: Forcetabindex="0"in Safari even for natively focusable elements as they are not always focusable by default. -
#1454
5b36f8fThanks @github-actions! - Allow sortable animations when changing to a different group even when the index remains the same. -
#1454
69bfad7Thanks @github-actions! -SortableKeyboardPlugin: UseclosestCornerscollision detection algorithm instead ofclosestCenterwhen keyboard sorting. -
#1517
c42a11bThanks @clauderic! - Support dragging across same-origin iframes. -
Updated dependencies [
984b5ab,081b7f2,69bfad7,a04d3f8,a8542de,f7458d9,b750c05,e70b29a,4d1a030,a6366f9,a5933d8,a5a556a,96f28ef,71dc39f]:- @dnd-kit/abstract@0.0.6
- @dnd-kit/collision@0.0.6
- @dnd-kit/geometry@0.0.6
- @dnd-kit/state@0.0.6
- Updated dependencies [
e9be505]:- @dnd-kit/abstract@0.0.5
- @dnd-kit/collision@0.0.5
- @dnd-kit/geometry@0.0.5
- @dnd-kit/state@0.0.5
-
#1443
2ccc27cThanks @clauderic! - Addedstatusproperty to draggable instances to know the current status of a draggable instance. Useful to know if an instance is being dropped. -
#1443
1b9df29Thanks @clauderic! - Force pointer events on children of the feedback element tonone. -
#1443
4dbcb1cThanks @clauderic! - Fix bugs with PointerSensor when interacting with anchor or image elements. -
#1443
e0d80f5Thanks @clauderic! - Refactor the lifecycle to allowmanagerto be optional and provided later during the lifecycle ofdraggable/droppable/sortableinstances. -
#1443
794cf2fThanks @clauderic! - Removedoptionsandoptions.registerfromEntitybase class. Passing anundefinedmanager when instantiatingDraggableandDroppablenow has the same effect. -
Updated dependencies [
2ccc27c,a4d9150,e0d80f5,794cf2f]:- @dnd-kit/abstract@0.0.4
- @dnd-kit/state@0.0.4
- @dnd-kit/collision@0.0.4
- @dnd-kit/geometry@0.0.4
-
8530c12Thanks @clauderic! - Fixed lifecycle related issues. -
#1440
8e45c2aThanks @clauderic! - Better handling of elements that havetransformortranslateapplied. The Feedback and Sortable plugins now no longer need to ignore transforms as theDOMRectanglecan compute the projected final coordinates of an element that has transforms applied even if it is currently being animated by looking at the last animation keyframe. -
Updated dependencies [
5ccd5e6,886de33]:- @dnd-kit/abstract@0.0.3
- @dnd-kit/collision@0.0.3
- @dnd-kit/geometry@0.0.3
- @dnd-kit/state@0.0.3
-
#1430
6c84308Thanks @clauderic! - -Sortable: Fixed a bug with optimistic re-ordering.Scroller: Fixed a bug with auto-scrolling when target is position fixed
-
#1430
d273f70Thanks @clauderic! - -Feedback: Fixed a bug with transitions being interrupted on drop when the draggable element has not been moved. -
#1430
34c6fdcThanks @clauderic! - -AutoScroller: Improve auto-scroller to continue scrolling even when outside the bounds of the element currently being scrolled. -
#1430
2c3ad5eThanks @clauderic! - -Feedback: Only restore focus after drop if theactivatorEventis a keyboard event. -
Updated dependencies [
6c84308]:- @dnd-kit/state@0.0.2
- @dnd-kit/abstract@0.0.2
- @dnd-kit/geometry@0.0.2
- @dnd-kit/collision@0.0.2