properly cleanup sidebar content after closing tab

This commit is contained in:
zadam 2019-12-23 21:46:37 +01:00
parent ea7257a5b2
commit d389100611
4 changed files with 14 additions and 3 deletions

View file

@ -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) {

View file

@ -438,6 +438,10 @@ class TabContext {
await this.saveNoteIfChanged();
this.$tabContent.remove();
}
if (this.sidebar) {
this.sidebar.remove();
}
}
cleanup() {

View file

@ -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;

View file

@ -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;
}