Skip to content

Commit

Permalink
ensure editor is empty when last tab is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Mar 24, 2024
1 parent 7b38aec commit 03ccc3e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 3 additions & 0 deletions src/components/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ class EditorTabs extends Tonic {
this.state.selectedTabId = previousSibling.id
this.selectTab(previousSibling.id)
}
} else {
// there are no more tabs. empty the editor
this.props.parent.editor.setValue('')
}
}

Expand Down
5 changes: 0 additions & 5 deletions src/css/component-project.css
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ app-project:not([dragging]) .item .handle:hover {
cursor: pointer;
}

app-project .item .handle[data-selected="1"] .node-data .label {
color: var(--tonic-accent);
text-decoration: underline;
}

app-project .item .node-data .label[disabled] {
color: var(--tonic-disabled);
}
Expand Down
4 changes: 4 additions & 0 deletions src/css/tonic-overrides.css
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ tonic-toggle .tonic--toggle--wrapper {
height: 24px !important;
}

tonic-button button {
border-radius: 4px !important;
}

tonic-button[type="icon"] tonic-icon {
margin-top: 2px;
}
Expand Down

0 comments on commit 03ccc3e

Please sign in to comment.