Skip to content
Merged
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
1 change: 1 addition & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ Change log
* fix: [#2980](https://github.com/gridstack/gridstack.js/issues/2980) dd-touch circular dependency
* fix: [#2667](https://github.com/gridstack/gridstack.js/issues/2667) sidebar items not honoring gs-w (enter-leave-re-enter)
* fix: [#2987](https://github.com/gridstack/gridstack.js/issues/2987) gs-size-to-content to support numbers
* fix: [#2981](https://github.com/gridstack/gridstack.js/issues/2981) Locked not working as expected

## 11.4.0 (2025-02-27)
* fix: [#2921](https://github.com/gridstack/gridstack.js/pull/2921) replace initMouseEvent with MouseEvent constructor and added composed: true
Expand Down
8 changes: 5 additions & 3 deletions src/gridstack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2459,14 +2459,16 @@ export class GridStack {
const noResize = node.noResize || this.opts.disableResize;

// check for disabled grid first
const disable = this.opts.staticGrid || (noMove && noResize);
const disable = node.locked || this.opts.staticGrid || (noMove && noResize);
if (force || disable) {
if (node._initDD) {
this._removeDD(el); // nukes everything instead of just disable, will add some styles back next
delete node._initDD;
}
if (disable) el.classList.add('ui-draggable-disabled', 'ui-resizable-disabled'); // add styles one might depend on #1435
if (!force) return this;
if (disable) {
el.classList.add('ui-draggable-disabled', 'ui-resizable-disabled'); // add styles one might depend on #1435
return this;
}
}

if (!node._initDD) {
Expand Down