Open XHXIAIEIN opened 1 month ago
I'm afraid I can't reproduce this. Normally I test IME issues using the Windows emoji picker, as that appears to fire the same compositionstart/end events as IME uses. If I follow these steps:
abs(
Windows
+ .
to show emoji pickerThen it correctly enters abs(😀
- there is no duplication. I verified it is firing compositionstart/end events so it doesn't appear those are doing anything wrong.
The input is in fact a contenteditable field and the browser itself handles entering characters - Construct only responds to the entered input and doesn't handle actually adding characters itself (unless you do something like choose an expression from the Expressions Dictionary or select an autocomplete suggestion). So it may be a browser bug or issue with the type of IME you are using.
Do you have any further advice on how to reproduce the problem?
I tried it and the error still occurs. The steps to reproduce are not like this
1 Open Settings Time & language
2 Add a language.
3 Search 'Chinese' and select the first one
4 You don't need to check them.
5 Download...
6 Press Windows + space to toggle IME, Or click this icon in the taskbar.
7 Then you will see an icon like this, indicating that you have switched to the Pinyin IME.
8 If you want to toggle English, you can press Shift
to switch between Chinese and English.
Let's return to this issues again.
1 It needs to be in closed brackets.
2 input 'jing', it will become 'jjing'
I think another possible solution to investigate is to design "throttle" and "debounce" functions the input events. https://medium.com/@mujaffarhssn/debouncing-vs-throttling-optimizing-your-javascript-for-performance-a99d38f5eb3b
Problem description
This question is a secondary question caused by the https://github.com/Scirra/Construct-bugs/issues/7988
In the parameter brackets of an expression, the first character entered will be duplicate. It is reproduced anywhere non-English string When using IME.
a possible line of investigation: https://developer.mozilla.org/en-US/docs/Web/API/Element/compositionstart_event
Attach a .c3p
issue-ime2.c3p.zip
Steps to reproduce
Any expression can be reproduced, use IME to input any characters in brackets. Note: | indicates the position of the cursor
Observed result
input: jing Observed: jjing
Expected result
no additional repeated characters
More details
Affected browsers/platforms:
First affected release:
System details
View details
PASTE HERE