diff --git a/packages/primevue/src/megamenu/MegaMenu.vue b/packages/primevue/src/megamenu/MegaMenu.vue index 31190a104..5bc0fa463 100755 --- a/packages/primevue/src/megamenu/MegaMenu.vue +++ b/packages/primevue/src/megamenu/MegaMenu.vue @@ -291,7 +291,7 @@ export default { if (!this.mobileActive) { focus(this.menubar); - this.menubar.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'smooth' }); + this.menubar.scrollIntoView && this.menubar.scrollIntoView({ block: 'nearest', inline: 'nearest', behavior: 'smooth' }); } } else { if (grouped) {