Question
ScriptUI - edittext cursor resets when other edittext text are changed
I have a problem with ScriptUI. Consider the folliwing example:
var dialog = new Window("dialog");
var txt1 = dialog.add("edittext", undefined, "0");
var txt2 = dialog.add("edittext", undefined, "0");
txt2.onChanging= function () {
txt1.text = txt1.text + '0';
}
dialog.show();
While I type on txt2 I basically change the text in txt1 as well.
This strangely reset txt2 cursor at the beginning of the text.
Is there a way to keep the cursor where it is?
I tried to change sliders, or other things while I type, but for some reason this is the only exception.
Thank you in advance