diff options
| author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2022-09-22 13:10:58 -0400 |
|---|---|---|
| committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2022-09-22 13:10:58 -0400 |
| commit | 1ec9505775315d0ba41b114942ff69d8ceb93e04 (patch) | |
| tree | 3dde9bb324814b419b4b5a27d9be3c30dd81d993 /src/client/views/collections/CollectionDockingView.tsx | |
| parent | 604b3e566eaf762ede05f4a31c459c20d0df020b (diff) | |
| parent | 40cc7455e853d306ee2750c51308d095dc2970ef (diff) | |
Merge branch 'master' of https://github.com/brown-dash/Dash-Web
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 25fe5fe43..c6ac5ee0c 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -477,6 +477,7 @@ export class CollectionDockingView extends CollectionSubView() { }; stackCreated = (stack: any) => { + stack = stack.header ? stack : stack.origin; stack.header?.element.on('mousedown', (e: any) => { const dashboard = Doc.ActiveDashboard; if (dashboard && e.target === stack.header?.element[0] && e.button === 2) { @@ -499,7 +500,7 @@ export class CollectionDockingView extends CollectionSubView() { .click( action(() => { //if (confirm('really close this?')) { - if (!stack.parent.parent.isRoot || stack.parent.contentItems.length > 1) { + if ((!stack.parent.isRoot && !stack.parent.parent.isRoot) || stack.parent.contentItems.length > 1) { stack.remove(); } else { alert('cant delete the last stack'); |
