ElemeFE / element

A Vue.js 2.0 UI Toolkit for Web
https://element.eleme.io/
MIT License
54.13k stars 14.64k forks source link

[Bug Report] Autcomplete, blur event should be triggered after select event #11943

Closed dmytrous closed 5 years ago

dmytrous commented 6 years ago

Element UI version

2.4.3

OS/Browsers version

Windows 10 / Chrome

Vue version

2.5.17-beta.0

Reproduction Link

https://jsfiddle.net/mmx38qxw/3480/

Steps to reproduce

  1. Focus on input
  2. Select some item

What is Expected?

Blur event triggered after select event

What is actually happening?

Blur event triggered just before select event

dmytrous commented 6 years ago

Case:

  1. Select 'vue' from suggestions list ['vue' is selected]
  2. Delete some character from input for example delete 'e' and result is 'vu'
  3. Lose focus on input, do not select any item from list
  4. We have selected value 'vue' but in input is displaying 'vu' To avoid this, need some checks in 'blur event' to detect that value changed from 'select event' but it's immpossible because 'blur event' triggered before 'select'
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.