Fix 3732 - add prop for capturing focus

This commit is contained in:
Sergio Crisostomo 2018-05-29 08:58:57 +02:00
parent 4cccdf1fd5
commit 28026b3f6f

View file

@ -84,6 +84,10 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
captureFocus: {
type: Boolean,
default: false
},
closable: { closable: {
type: Boolean, type: Boolean,
default: false default: false
@ -376,7 +380,7 @@
[...this.$refs.panes.children].forEach((el, i) => { [...this.$refs.panes.children].forEach((el, i) => {
if (index === i) { if (index === i) {
[...el.children].forEach(child => child.style.visibility = 'visible'); [...el.children].forEach(child => child.style.visibility = 'visible');
setTimeout(() => focusFirst(el, el), transitionTime); if (this.captureFocus) setTimeout(() => focusFirst(el, el), transitionTime);
} else { } else {
setTimeout(() => { setTimeout(() => {
[...el.children].forEach(child => child.style.visibility = 'hidden'); [...el.children].forEach(child => child.style.visibility = 'hidden');