mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
Fixed editor drag/drop getting stuck
no issue - sometimes it was possible for a drop target element to not have a child which would cause an error and cause drag/drop to get stuck with the dragged element sticking to the cursor with no action occurring on mouseup, requiring an `Esc` press but all further drags also being broken - added a guard so we can handle `element.firstChild` not existing
This commit is contained in:
parent
0ae423bbb4
commit
f24f6e5d0d
@ -1234,9 +1234,11 @@ export default Component.extend({
|
||||
return;
|
||||
}
|
||||
|
||||
let cardId = cardElement.firstChild.id;
|
||||
let cardId = cardElement.firstChild?.id;
|
||||
|
||||
if (cardId) {
|
||||
return this.componentCards.findBy('destinationElementId', cardId);
|
||||
}
|
||||
},
|
||||
|
||||
getSectionFromCard(card) {
|
||||
|
Loading…
Reference in New Issue
Block a user