Element UI version
2.12.0
OS/Browsers version
Ubuntu 18.04.5 / Google Chrome 85.0.4183.83
Vue version
2.6.10
Reproduction Link
https://jsfiddle.net/b4wz7fqn/5/
Steps to reproduce
Click the <el-autocomplete>
. Select one of the suggestions.
What is Expected?
I expected the callback for @select
to be called. And maybe @blur
afterwards... But only AFTER @select
, otherwise there is no way to know whether the user is clicking out or not.
What is actually happening?
The callback for @blur
is called, which means that I cannot know if the user is clicking out or just selecting something from the dropdown.
6条答案
按热度按时间2eafrhcq1#
Same Bug in el-select #10810
wn9m85ua2#
same issues
zpqajqem3#
Element UI version
2.12.0
OS/Browsers version
Ubuntu 18.04.5 / Google Chrome 85.0.4183.83
Vue version
2.6.10
Reproduction Link
https://jsfiddle.net/b4wz7fqn/5/
Steps to reproduce
Click the
<el-autocomplete>
. Select one of the suggestions.What is Expected?
I expected the callback for
@select
to be called. And maybe@blur
afterwards... But only AFTER@select
, otherwise there is no way to know whether the user is clicking out or not.What is actually happening?
The callback for
@blur
is called, which means that I cannot know if the user is clicking out or just selecting something from the dropdown.add setTimeout can't alleviate this problem
I found a way to circumvent the blur issue, But it’s not very elegant.
hope can help you
hfsqlsce4#
same problem, who resolved?
yzckvree5#
Adding setTimeout to focus can alleviate this problem,But I also want to know a better solution
bvk5enib6#
Same problem, in addition, the blur function is called before the value is assigned, so if the el-autocomplete is in form to be validated and the validation rule is set to blur, the validation will be triggered