Element: Select source code listens to Keyup event processing, causing the Chinese input method to remotely search and trigger the user's expected results.

Created on 8 Jun 2018  ·  5Comments  ·  Source: ElemeFE/element

Element UI version

2.4.1

OS/Browsers version

windows

Vue version

2.5.17-beta.0

Reproduction Link

Steps to reproduce

  1. 远程搜索非多选模式
  2. 先选中一个
  3. 开启中文输入法,点击input框,输入字母,此时会触发keyup的debouncedOnInputChange回调,行为不符合预期
  4. 若第一次点击input框无法触发,blur后再试一次,很容易重现

What is Expected?

中文输入法输入后未选中时,不应该出发select的回调,比较简单的方法是不监听keyup而是监听input事件

What is actually happening?

中文输入法输入后未选中时触发了select的回调

All 5 comments

Translation of this issue:

Element UI version
2.4.1

OS/Browsers version
Windows

Vue version
2.5.17-beta.0

Reproduction Link
Steps to reproduce

  1. remote search non multi selection mode
  2. first to select one

  3. open the Chinese input method, click the input box, enter the letter, this will trigger the callback of Keyup debouncedOnInputChange, and the behavior is not up to expectations.

  4. if you cannot click on the input box for the first time, try again after blur, which is easy to reproduce.

What is Expected?
When the Chinese input method is not selected, it should not start the callback of select. The simpler way is not to listen to Keyup, but to monitor the input event.

What is actually happening?
When the Chinese input method is not selected, it triggers the callback of select.

Hi, please read the FAQ before submitting an issue. The answer to this question can be found there.

The FAQ can't fix this issue, can someone real person look into this?

请提供 demo。

我也遇到了这种情况。无论是使用 async/await 还是传统的 then callback chain 都会在第一次输入拼音后导致远程搜索失效,刷新后输入非拼音字母则可以正常使用。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chao-hua picture chao-hua  ·  3Comments

EdenSpark picture EdenSpark  ·  3Comments

smallpath picture smallpath  ·  3Comments

yorululu picture yorululu  ·  3Comments

yubo111 picture yubo111  ·  3Comments