-
Bug
-
Resolution: Fixed
-
Normal
-
3.9.1
-
None
-
Security Level: Jimmy
-
None
Steps to Reproduce
1. quick typing "12"
Current Result
Sometimes ZSS reverses (transpose) each digits, so the result is 21 instead of 12
Expected Result
"12" as the typing order
Debug Info
- since we call placeCaretAtEnd() in setTimeout(), so there is a minor time delay that users can type the 2nd character before moving the caret to the end. So the resulting character sequence doesn't match the typing sequence. If we increase the timeout time, it's even easier to produce such issue.
setTimeout(function() { $edit.focus(); //ZSS-1214 if (percent) { placeCaretBeforeEnd(editorcmp); } else { placeCaretAtEnd(editorcmp); } }, 125);
- check chrome profiling "t4907-chrome-profiling.zip"
Workaround
- zss.Editbox.edit(), don't call placeCaretAtEnd() in a setTimeout callback