diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue index 8e405ad9c8..5d9ff92c43 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentEditor/AssessmentEditor.vue @@ -12,6 +12,7 @@ { + const questionCards = this.$refs['questionCardRef']; + if (questionCards?.length >= 1) { + const lastQuestionCard = questionCards[questionCards.length - 1].$el; + const editorDiv = document.getElementById('editViewId'); + editorDiv.scrollTo({ + top: lastQuestionCard.offsetTop, + behavior: 'smooth', + }); + } + }); }, async deleteItem(itemToDelete) { if (this.isItemActive(itemToDelete)) { diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue index c31c922508..28290e82d6 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/AssessmentItemEditor/AssessmentItemEditor.vue @@ -285,13 +285,6 @@ if (!this.question) { this.openQuestion(); } - // Assessments are nested inside of a scrolling panel. - // Instead of propagating an event all the way back to - // the scrolling panel, just use scrollIntoView - // (supported by most major browsers) - if (this.$el.scrollIntoView) { - this.$el.scrollIntoView({ behaviour: 'smooth' }); - } }, methods: { updateItem(payload) { diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue index f3ce855b2e..4a1e0cebb5 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue @@ -1,6 +1,6 @@