Commit cbff5e3641383f71cbd7e2d910e97a6ad9a0fc99

Authored by Aresn
Committed by GitHub
2 parents 1cd7dd8b 28026b3f

Merge pull request #3743 from SergioCrisostomo/tab-patches

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');
... ...