mirror of
https://github.com/zadam/trilium.git
synced 2025-01-17 04:27:56 +08:00
properly cleanup sidebar content after closing tab
This commit is contained in:
parent
ea7257a5b2
commit
d389100611
4 changed files with 14 additions and 3 deletions
|
@ -154,6 +154,12 @@ class Sidebar {
|
|||
this.$widgetContainer.empty().append(...widgetsToAppend);
|
||||
}
|
||||
|
||||
remove() {
|
||||
if (this.$widgetContainer) {
|
||||
this.$widgetContainer.remove();
|
||||
}
|
||||
}
|
||||
|
||||
eventReceived(name, data) {
|
||||
for (const widget of this.widgets) {
|
||||
if (widget.eventReceived) {
|
||||
|
|
|
@ -438,6 +438,10 @@ class TabContext {
|
|||
await this.saveNoteIfChanged();
|
||||
this.$tabContent.remove();
|
||||
}
|
||||
|
||||
if (this.sidebar) {
|
||||
this.sidebar.remove();
|
||||
}
|
||||
}
|
||||
|
||||
cleanup() {
|
||||
|
|
|
@ -212,8 +212,8 @@ body {
|
|||
.note-tab-row {
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
height: 33px;
|
||||
min-height: 33px;
|
||||
height: 34px;
|
||||
min-height: 34px;
|
||||
width: 100%;
|
||||
background: var(--main-background-color);
|
||||
border-radius: 5px 5px 0 0;
|
||||
|
|
|
@ -475,12 +475,13 @@ button.icon-button {
|
|||
}
|
||||
|
||||
#global-menu-wrapper {
|
||||
height: 35px;
|
||||
border-bottom: 1px solid var(--main-border-color);
|
||||
}
|
||||
|
||||
#global-menu button {
|
||||
margin-right: 10px;
|
||||
height: 34px;
|
||||
height: 33px;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue