Skip to content

Commit 0eb9bcb

Browse files
committed
prepareDragDrop() returns for disable after deletion
* fixed logic to always return once disabled
1 parent 6a71958 commit 0eb9bcb

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

doc/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ Change log
139139
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
140140
## 12.5.0-dev (TBD)
141141
* feat: [#3250](https://github.com/gridstack/gridstack.js/pull/3250) full RTL support - thank you [Daniel Cohen Gindi](https://github.com/danielgindi)
142+
* fix: [#3261](https://github.com/gridstack/gridstack.js/pull/3261) prepareDragDrop() returns for disable after deletion
142143

143144
## 12.5.0 (2026-04-05)
144145
* fix: [#3237](https://github.com/gridstack/gridstack.js/pull/3237) updateOptions() fixes for columnOpts, maxRow. load() not cloning

src/gridstack.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2723,8 +2723,10 @@ export class GridStack {
27232723
this._removeDD(el); // nukes everything instead of just disable, will add some styles back next
27242724
delete node._initDD;
27252725
}
2726-
if (disable) el.classList.add('ui-draggable-disabled', 'ui-resizable-disabled'); // add styles one might depend on #1435
2727-
if (!force) return this;
2726+
if (disable) {
2727+
el.classList.add('ui-draggable-disabled', 'ui-resizable-disabled'); // add styles one might depend on #1435
2728+
return this;
2729+
}
27282730
}
27292731

27302732
if (!node._initDD) {

0 commit comments

Comments
 (0)