mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
set cssClass and other note related classes on the root widget instead, fixes #1799
This commit is contained in:
16
src/public/app/widgets/containers/scrolling_container.js
Normal file
16
src/public/app/widgets/containers/scrolling_container.js
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user