From 28026b3f6ffe67ddba15886d5cfba8bbf9a46a7c Mon Sep 17 00:00:00 2001 From: Sergio Crisostomo Date: Tue, 29 May 2018 08:58:57 +0200 Subject: [PATCH] Fix 3732 - add prop for capturing focus --- src/components/tabs/tabs.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/tabs/tabs.vue b/src/components/tabs/tabs.vue index ff3236b6..4a7404ff 100644 --- a/src/components/tabs/tabs.vue +++ b/src/components/tabs/tabs.vue @@ -84,6 +84,10 @@ type: Boolean, default: true }, + captureFocus: { + type: Boolean, + default: false + }, closable: { type: Boolean, default: false @@ -376,7 +380,7 @@ [...this.$refs.panes.children].forEach((el, i) => { if (index === i) { [...el.children].forEach(child => child.style.visibility = 'visible'); - setTimeout(() => focusFirst(el, el), transitionTime); + if (this.captureFocus) setTimeout(() => focusFirst(el, el), transitionTime); } else { setTimeout(() => { [...el.children].forEach(child => child.style.visibility = 'hidden');