[TIMOB-26372] iOS: Assigning text value in change event causes duplicated input on TextView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2018-09-13T07:25:19.000+0000 |
Affected Version/s | Release 7.3.1 |
Fix Version/s | Release 7.5.0 |
Components | iOS |
Labels | n/a |
Reporter | Jan Vennemann |
Assignee | Jan Vennemann |
Created | 2018-09-08T09:44:59.000+0000 |
Updated | 2018-09-13T12:42:23.000+0000 |
Description
*Steps to reproduce the behavior*
Add the following code to your app.js of a classic project:
var win = Ti.UI.createWindow({
backgroundColor: '#fff'
});
const textArea = Ti.UI.createTextArea({
backgroundColor: 'lightgray',
height: 100,
width: 200
});
textArea.addEventListener('change', (e) => {
// This will trigger an additional change event and duplicate input
textArea.value = e.value;
});
win.add(textArea);
win.open();
*Actual behavior*
Any input will be duplicated in the TextView itself. For example pressing 'H' will result in 'HH' appearing in the TextView.
*Expected behavior*
The value of the text view can be assigned without any side effects.
*Additional notes*
This is required for the two-way binding in Vue.js. The iOS TextField does not have this issues, neither does any of the text widgets on Android.
*Closing ticket.* Verified improvement in SDK version:
7.5.0.v20180913035354
. Assigning text value in change event no longer causes duplicated input on TextView. *FR Passed (Test Steps):*Created a new Titanium application
Added the code above in to the application
Installed app on to the device
Ran the app
Entered text in to the textview
No longer saw duplicated text
*Environment*