To reproduce:
Code: Select all
// test of input box
{
const inputTest = {
initialize() {
},
commit() {
},
txB1(dialog) {
console.println( JSON.stringify( dialog.store()));
},
description: {
name: "Edit text box", // Dialog box title
elements:
[{ type: 'edit_text', width: 300, item_id: 'txB1', PopupEdit: true
},
{ type: 'ok'}
]
}
};
app.execDialog(inputTest);
}
Code: Select all
{"txB1":""}
{"txB1":""} // text box actually contains 1
{"txB1":"1"}
{"txB1":"12"} // it caught up to 12
{"txB1":"12"}
{"txB1":"123"}
{"txB1":"123"}
{"txB1":"1234"}
{"txB1":"1234"}
{"txB1":"12345"} // 12345 (it stayed caught up, the event happening twice for each keystroke with the data provided first the value before the keystroke, then after)
{"txB1":"12345"} // 1234 (deleting it's showing the old data and only firing the change event once)
{"txB1":"1234"} // 123
{"txB1":"123"} // 12
{"txB1":"12"} // 1
{"txB1":"1"} // empty