If the notify content overflows, as focus gets applied to the buttons for alert and prompt types, the content opens already scrolled due to the position of the buttons.
This can be resolved by forcing the scroll back to the top in onLoaded:
|
async onLoaded() { |
|
this.hasOpened = true; |
|
// Allows popup manager to control focus |
|
a11y.popupOpened(this.$('.notify__popup')); |
|
a11y.scrollDisable('body'); |
|
$('html').addClass('notify'); |
|
|
|
this.$el.addClass('anim-show-before'); |
|
// Set focus to first accessible element |
|
a11y.focusFirst(this.$('.notify__popup'), { defer: false }); |
|
await transitionNextFrame(); |
|
this.resetNotifySize(); |
|
await transitionNextFrame(); |
|
this.$el.addClass('anim-show-after'); |
|
await transitionsEnded(this.$('.notify__popup, .notify__shadow')); |
|
} |
const $dialog = this.$('.notify__popup');
$dialog.scrollTop(0);
If the notify content overflows, as focus gets applied to the buttons for
alertandprompttypes, the content opens already scrolled due to the position of the buttons.This can be resolved by forcing the scroll back to the top in
onLoaded:adapt-contrib-core/js/views/notifyPopupView.js
Lines 133 to 148 in 75e0ab9