Commit 28026b3f6ffe67ddba15886d5cfba8bbf9a46a7c

Authored by Sergio Crisostomo
1 parent 4cccdf1f

Fix 3732 - add prop for capturing focus

Showing 1 changed file with 5 additions and 1 deletions   Show diff stats
src/components/tabs/tabs.vue
... ... @@ -84,6 +84,10 @@
84 84 type: Boolean,
85 85 default: true
86 86 },
  87 + captureFocus: {
  88 + type: Boolean,
  89 + default: false
  90 + },
87 91 closable: {
88 92 type: Boolean,
89 93 default: false
... ... @@ -376,7 +380,7 @@
376 380 [...this.$refs.panes.children].forEach((el, i) => {
377 381 if (index === i) {
378 382 [...el.children].forEach(child => child.style.visibility = 'visible');
379   - setTimeout(() => focusFirst(el, el), transitionTime);
  383 + if (this.captureFocus) setTimeout(() => focusFirst(el, el), transitionTime);
380 384 } else {
381 385 setTimeout(() => {
382 386 [...el.children].forEach(child => child.style.visibility = 'hidden');
... ...