I borrowed this code from the official websitetooltip, but I ran into problems with the use of the project, and then tested the official website code, and the same problem
- When I enter English characters, it fires once by default, and
state.selection.empty
is true
2.When I enter Chinese characters, it is triggered twice in a row, and state.selection.empty
is false the first time and true the second time
Then I debugged directly on the official website, when I entered the comma character in Chinese, I found that the cursor selected it by default, resulting in the selection not being empty, and there was no problem with English
Pls how can I solve the problem, thanks!