In Firefox, if a textarea gets focus and the input method is activated, such as Sogou input method, when typing the first pinyin of a Chinese character, if the background js modifies the value of the textarea at this time, then the textarea will It is cleared directly, as shown in the figure
In this state, if js modifies the value of textarea, the bug will be triggered.
How to solve this problem?
After many attempts, I found that only when js modifies the value, the textarea loses focus. After modification, it can gain focus again. This bug also applies to input