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 27, 2023
1 parent a90d359 commit 67e5ec6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ export const SectionItemView = Marionette.ItemView.extend({
},

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 67e5ec6

Please sign in to comment.