diff --git a/src/components/megamenu/MegaMenu.vue b/src/components/megamenu/MegaMenu.vue index 5ccc67f5fc..eb70fee811 100755 --- a/src/components/megamenu/MegaMenu.vue +++ b/src/components/megamenu/MegaMenu.vue @@ -524,7 +524,7 @@ export default { }, scrollInView(index = -1) { const id = index !== -1 ? `${this.id}_${index}` : this.focusedItemId; - const element = DomHandler.findSingle(this.list, `li[id="${id}"]`); + const element = DomHandler.findSingle(this.menubar, `li[id="${id}"]`); if (element) { element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' }); diff --git a/src/components/menubar/Menubar.vue b/src/components/menubar/Menubar.vue index ec06963f7e..1a8aa53be1 100755 --- a/src/components/menubar/Menubar.vue +++ b/src/components/menubar/Menubar.vue @@ -540,7 +540,7 @@ export default { }, scrollInView(index = -1) { const id = index !== -1 ? `${this.id}_${index}` : this.focusedItemId; - const element = DomHandler.findSingle(this.list, `li[id="${id}"]`); + const element = DomHandler.findSingle(this.menubar, `li[id="${id}"]`); if (element) { element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' }); diff --git a/src/components/tieredmenu/TieredMenu.vue b/src/components/tieredmenu/TieredMenu.vue index c53dbe0b76..70b64c277d 100755 --- a/src/components/tieredmenu/TieredMenu.vue +++ b/src/components/tieredmenu/TieredMenu.vue @@ -570,7 +570,7 @@ export default { }, scrollInView(index = -1) { const id = index !== -1 ? `${this.id}_${index}` : this.focusedItemId; - const element = DomHandler.findSingle(this.list, `li[id="${id}"]`); + const element = DomHandler.findSingle(this.menubar, `li[id="${id}"]`); if (element) { element.scrollIntoView && element.scrollIntoView({ block: 'nearest', inline: 'start' });