Skip to content

Commit

Permalink
explore mode: when moving back to a part, scroll .mainDisplay back to…
Browse files Browse the repository at this point in the history
… the top

fixes #1079
  • Loading branch information
christianp committed Feb 9, 2024
1 parent e793d52 commit e9012f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions themes/default/files/scripts/question-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ Numbas.queueScript('question-display',['display-util', 'display-base','jme-varia
this.currentPart.subscribe(function(pd) {
pd.html_promise.then(function(html) {
html.scrollIntoView();
document.querySelector('main.mainDisplay').scrollTo({top: 0});
});
},this);

Expand Down

0 comments on commit e9012f8

Please sign in to comment.