Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10596] Android: Textfield change event gets triggered when window opens.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionCannot Reproduce
Resolution Date2013-03-05T13:24:35.000+0000
Affected Version/sRelease 2.1.1
Fix Version/sRelease 3.0.2
ComponentsAndroid
Labelsapi, community
ReporterLucian Pacurar
Assigneejithinpv
Created2012-08-20T23:31:51.000+0000
Updated2017-03-27T20:17:31.000+0000

Description

Problem

If you create a window and add textfields to it to which a 'change' event handler is attached, when the window opens the textfield 'change' event gets triggered. It's reproducible only on Android.

Test case

var win1 = Ti.UI.createWindow({
	title: 'Bug'
});

var textField1 = Ti.UI.createTextField();
var textField2 = Ti.UI.createTextField();

win1.add(textField1);
win1.add(textField2);

textField1.addEventListener('change', function() {
	alert('field 1 changed');
});
textField2.addEventListener('change', function() {
	alert('field 2 changed');
});

win1.open();

Discussions

http://developer.appcelerator.com/question/141228/android-textfield-change-event-firing-when-its-parent-window-opens

Comments

  1. jithinpv 2013-03-05

    Issue does not reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Android Emulator: Android SDK version: 2.2
  2. Lee Morris 2017-03-27

    Closing ticket as I am unable to reproduce this issue with the following environment; Pixel (7.1) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source