From 1f3167594250de6a13e201bd4f26b48cab6c9303 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Fri, 26 Jun 2020 11:32:46 +0300 Subject: [PATCH] Tabview bar fixes --- src/components/tabmenu/TabMenu.vue | 3 ++- src/components/tabview/TabView.vue | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/tabmenu/TabMenu.vue b/src/components/tabmenu/TabMenu.vue index 6b4bb6471..7ba6f660d 100755 --- a/src/components/tabmenu/TabMenu.vue +++ b/src/components/tabmenu/TabMenu.vue @@ -78,7 +78,7 @@ export default { updateInkBar() { let tabHeader = this.$refs.nav.children[this.findActiveTabIndex()]; this.$refs.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px'; - this.$refs.inkbar.style.left = tabHeader.offsetLeft + 'px'; + this.$refs.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.$refs.nav).left + 'px'; } }, computed: { @@ -122,5 +122,6 @@ export default { .p-tabmenu-ink-bar { display: none; + z-index: 1; } diff --git a/src/components/tabview/TabView.vue b/src/components/tabview/TabView.vue index 0720b7a48..5f3ad675f 100755 --- a/src/components/tabview/TabView.vue +++ b/src/components/tabview/TabView.vue @@ -86,7 +86,7 @@ export default { updateInkBar() { let tabHeader = this.$refs.nav.children[this.findActiveTabIndex()]; this.$refs.inkbar.style.width = DomHandler.getWidth(tabHeader) + 'px'; - this.$refs.inkbar.style.left = tabHeader.offsetLeft + 'px'; + this.$refs.inkbar.style.left = DomHandler.getOffset(tabHeader).left - DomHandler.getOffset(this.$refs.nav).left + 'px'; } }, computed: { @@ -124,6 +124,7 @@ export default { .p-tabview-ink-bar { display: none; + z-index: 1; } .p-tabview-nav-link:focus {