Skip to content

Commit 03ccc3e

Browse files
committed
ensure editor is empty when last tab is closed
1 parent 7b38aec commit 03ccc3e

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/components/editor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ class EditorTabs extends Tonic {
184184
this.state.selectedTabId = previousSibling.id
185185
this.selectTab(previousSibling.id)
186186
}
187+
} else {
188+
// there are no more tabs. empty the editor
189+
this.props.parent.editor.setValue('')
187190
}
188191
}
189192

src/css/component-project.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ app-project:not([dragging]) .item .handle:hover {
9696
cursor: pointer;
9797
}
9898

99-
app-project .item .handle[data-selected="1"] .node-data .label {
100-
color: var(--tonic-accent);
101-
text-decoration: underline;
102-
}
103-
10499
app-project .item .node-data .label[disabled] {
105100
color: var(--tonic-disabled);
106101
}

src/css/tonic-overrides.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ tonic-toggle .tonic--toggle--wrapper {
105105
height: 24px !important;
106106
}
107107

108+
tonic-button button {
109+
border-radius: 4px !important;
110+
}
111+
108112
tonic-button[type="icon"] tonic-icon {
109113
margin-top: 2px;
110114
}

0 commit comments

Comments
 (0)