You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.
现象:当连续点击 想一想 按钮后单击空格会导致两次词语生成。
推测:点击后焦点留在按钮上,按空格可以触发单击和按钮两个事件。
证实:
第二步和第四步响应不同,同时焦点位置也不同。
Q.E.D
修正建议:在监听到键盘按键后判断焦点是否在按钮上,如果在则直接取消事件传播。如果不在则调用一次生成函数。The text was updated successfully, but these errors were encountered: