Skip to content

Commit

Permalink
Scroll to active section rendering outline
Browse files Browse the repository at this point in the history
REDMINE-20217
  • Loading branch information
tf committed Sep 26, 2023
1 parent a90d359 commit 55e50ec
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ export const SectionItemView = Marionette.ItemView.extend({
this.$el[0].scrollIntoView({
block: 'nearest',
behavior: 'smooth'
});
}
});
},

onRender() {
this.updateActive();
if (this.updateActive()) {
setTimeout(() => this.$el[0].scrollIntoView({block: 'nearest'}), 10)
}

this.$el.toggleClass(styles.invert, !!this.model.configuration.get('invert'));

this.subview(new SectionThumbnailView({
Expand Down

0 comments on commit 55e50ec

Please sign in to comment.