Correct event propagation on transfer (fixes 3708 and 3695)
This commit is contained in:
parent
743f6e0639
commit
5c846d28a6
1 changed files with 9 additions and 1 deletions
|
@ -427,7 +427,7 @@
|
|||
let initialValue = Array.isArray(value) ? value : [value];
|
||||
if (!multiple && (typeof initialValue[0] === 'undefined' || (String(initialValue[0]).trim() === '' && !Number.isFinite(initialValue[0])))) initialValue = [];
|
||||
return initialValue.filter((item) => {
|
||||
return Boolean(item) || item === 0
|
||||
return Boolean(item) || item === 0;
|
||||
});
|
||||
},
|
||||
processOption(option, values, isFocused){
|
||||
|
@ -488,6 +488,14 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (this.transfer) {
|
||||
const {$el} = this.$refs.dropdown;
|
||||
if ($el === event.target || $el.contains(event.target)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (this.filterable) {
|
||||
const input = this.$el.querySelector('input[type="text"]');
|
||||
this.caretPosition = input.selectionStart;
|
||||
|
|
Loading…
Add table
Reference in a new issue