find widget readonly notes

This commit is contained in:
zadam
2022-05-26 16:29:54 +02:00
parent f250b72563
commit ade77e5fb8
6 changed files with 78 additions and 18 deletions

View File

@@ -5,6 +5,7 @@ export default class ScrollingContainer extends Container {
super();
this.css('overflow', 'auto');
this.css('position', 'relative');
}
setNoteContextEvent({noteContext}) {
@@ -35,7 +36,7 @@ export default class ScrollingContainer extends Container {
const promise = super.handleEventInChildren(name, data);
// there seems to be some asynchronicity and we need to wait a bit before scrolling
// there seems to be some asynchronicity, and we need to wait a bit before scrolling
promise.then(() => setTimeout(() => this.$widget.scrollTop(scrollTop), 500));
return promise;
@@ -44,4 +45,8 @@ export default class ScrollingContainer extends Container {
return super.handleEventInChildren(name, data);
}
}
scrollContainerToCommand({position}) {
this.$widget.scrollTop(position);
}
}