diff --git a/CHANGELOG.md b/CHANGELOG.md index d0176326..c5a6056a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.16.7 + +- bug fixes + - editor: error when ctrl+clicking on a root's child ## 1.16.6 diff --git a/src/client/editor/index.js b/src/client/editor/index.js index d646989c..a6ad4d1f 100644 --- a/src/client/editor/index.js +++ b/src/client/editor/index.js @@ -562,12 +562,14 @@ class Editor { } - var parent = this.selectedWidgets[0].parent - while (parent !== widgetManager) { - if (parent.getProp('lock')) { - this.selectedWidgets = [parent] + if (this.selectedWidgets.length) { + var parent = this.selectedWidgets[0].parent + while (parent !== widgetManager) { + if (parent.getProp('lock')) { + this.selectedWidgets = [parent] + } + parent = parent.parent } - parent = parent.parent } if (options.fromLasso && !options.lassoEnd) return