Notes/src/public/app/widgets/containers/scrolling_container.js

17 lines
471 B
JavaScript
Raw Normal View History

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