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