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
3 changes: 2 additions & 1 deletion doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ Change log

## 10.3.0-dev (TBD)
* fix: [#2734](https://github.com/gridstack/gridstack.js/bug/2734) rotate() JS error
* fix: [#2739](https://github.com/gridstack/gridstack.js/pull/2739) resizeToContent JS error with nested grid
* fix: [#2741](https://github.com/gridstack/gridstack.js/pull/2741) resizeToContent JS error with nested grid
* fix: [#2740](https://github.com/gridstack/gridstack.js/bug/2740) nested grid drag fix

## 10.3.0 (2024-06-26)
* fix: [#2720](https://github.com/gridstack/gridstack.js/pull/2720) load() now creates widgets in order (used to be reverse due to old collision code)
Expand Down
5 changes: 3 additions & 2 deletions src/dd-draggable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ export class DDDraggable extends DDBaseImplement implements HTMLElementExtendOpt
super();

// get the element that is actually supposed to be dragged by
let handleName = option.handle.substring(1);
this.dragEls = el.classList.contains(handleName) ? [el] : Array.from(el.querySelectorAll(option.handle));
const handleName = option.handle.substring(1);
const n = el.gridstackNode;
this.dragEls = el.classList.contains(handleName) ? [el] : (n?.subGrid ? [el.querySelector(option.handle) || el] : Array.from(el.querySelectorAll(option.handle)));
if (this.dragEls.length === 0) {
this.dragEls = [el];
}
Expand Down