From 44ae64bbf4c1d19e6b6be6e8aa9716d8f712acd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 20 Oct 2022 13:26:53 +0300 Subject: [PATCH] Refactor #3125, #3100, #3020 --- src/components/megamenu/MegaMenu.vue | 2 +- src/components/menubar/Menubar.vue | 2 +- src/components/tieredmenu/TieredMenu.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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' });