MDL-61633 assignfeedback_editpdf: Scroll back to top when changing pages

This commit is contained in:
Tony Butler 2018-03-05 15:26:46 +00:00
parent 44890bd738
commit 31e1884de2
4 changed files with 4 additions and 1 deletions

View File

@ -4595,6 +4595,7 @@ EDITOR.prototype = {
drawingcanvas.setStyle('backgroundImage', 'url("' + page.url + '")');
drawingcanvas.setStyle('width', page.width + 'px');
drawingcanvas.setStyle('height', page.height + 'px');
drawingcanvas.scrollIntoView();
// Update page select.
this.get_dialogue_element(SELECTOR.PAGESELECT).set('selectedIndex', this.currentpage);

View File

@ -4595,6 +4595,7 @@ EDITOR.prototype = {
drawingcanvas.setStyle('backgroundImage', 'url("' + page.url + '")');
drawingcanvas.setStyle('width', page.width + 'px');
drawingcanvas.setStyle('height', page.height + 'px');
drawingcanvas.scrollIntoView();
// Update page select.
this.get_dialogue_element(SELECTOR.PAGESELECT).set('selectedIndex', this.currentpage);

View File

@ -1322,6 +1322,7 @@ EDITOR.prototype = {
drawingcanvas.setStyle('backgroundImage', 'url("' + page.url + '")');
drawingcanvas.setStyle('width', page.width + 'px');
drawingcanvas.setStyle('height', page.height + 'px');
drawingcanvas.scrollIntoView();
// Update page select.
this.get_dialogue_element(SELECTOR.PAGESELECT).set('selectedIndex', this.currentpage);