Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17722] Android : The change event for textfield fires on orientation change

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-06-27T18:43:51.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sn/a
ComponentsAndroid
Labelsqe-3.4.0
ReporterSatyam Sekhri
AssigneeEric Merriman
Created2014-09-18T06:33:55.000+0000
Updated2017-06-27T18:43:51.000+0000

Description

The textfield change event gets fired when the soft keyboard is up and the device orientation is changed. This is not a regression as the issue also occurs in SDK 3.3.0.GA The issue occurs only on Android and not on iOS Steps to Reproduce: 1. Run an application with code below on Android device 2. Click on the textfield to invoke the soft keyboard 3. Rotate the device to another orientation Actual Result: The change event for the textfield is fired and the console shows "[info] Change Event Fired: TestChantgeEvent" Expected Result: The change event should fire only when there is change in text value in textfield and not on orientation change.
var window = Ti.UI.createWindow({
	backgroundColor: 'white'
});
var textField = Ti.UI.createTextField({
	top : 10,
	color : 'black',
	value : 'TestChangeEvent'
});

textField.addEventListener('change', function(e) {
	Ti.API.info("Change Event Fired: " + e.value);
});

window.add(textField);

window.open();

Comments

  1. jithinpv 2014-09-19

    Issue reproduces Titanium SDK version 3.4.0 master Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Nexus 5, Android version : 4.4.4
  2. Lee Morris 2017-06-27

    I am unable to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170623141152 Appc NPM 4.2.9 Appc CLI 6.2.1 Ti CLI 5.0.13 Alloy 1.9.11 Arrow 2.0.0 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source