set cssClass and other note related classes on the root widget instead, fixes #1799

This commit is contained in:
zadam
2021-03-28 22:24:24 +02:00
parent 2e6cd5f809
commit 57db945558
11 changed files with 58 additions and 38 deletions

View File

@@ -0,0 +1,16 @@
import Container from "./container.js";
export default class ScrollingContainer extends Container {
constructor() {
super();
this.css('height: 100%; overflow: auto;');
}
async tabNoteSwitchedEvent({tabContext, notePath}) {
// if notePath does not match then the tabContext has been switched to another note in the mean time
if (tabContext.notePath === notePath) {
this.$widget.scrollTop(0);
}
}
}