Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/resizemirror-destroy-listener.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/draggable': patch
---

Fix `ResizeMirror` not registering its `mirror:destroy` listener in `attach()`. The listener was removed in `detach()` but never bound, so the internal `mirror` reference was never cleared between drags. The companion `Snappable` plugin already binds both `mirror:created` and `mirror:destroy`; this restores symmetry.
1 change: 1 addition & 0 deletions src/Plugins/ResizeMirror/ResizeMirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export default class ResizeMirror extends AbstractPlugin {
attach() {
this.draggable
.on('mirror:created', this.onMirrorCreated)
.on('mirror:destroy', this.onMirrorDestroy)
.on('drag:over', this.onDragOver)
.on('drag:over:container', this.onDragOver);
}
Expand Down
Loading