Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27717] iOS: 'click' event in Ti.UI.TextField is not working for iOS >= 11.x

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionNot Our Bug
Resolution Date2020-06-11T11:00:32.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
LabelsengTriage, textfield
ReporterVijay Singh
AssigneeVijay Singh
Created2020-01-10T18:56:19.000+0000
Updated2020-06-30T10:14:31.000+0000

Description

In iOS 10.x 'click' event is working fine for TI.UI.TextField but for iOS >= 11.x it is not working. On some experiment I found that in iOS >= 11.x there are restriction on touch event callbacks. Probably document need to be updated. Workaround to this issue is - Use 'touchstart' event or set 'enabled' property to false. Test Case -
      var win = Ti.UI.createWindow({
	    backgroundColor: '#fff'
	});
	
	var textField = Ti.UI.createTextField({
	    top: 120,
	    hintText: 'Trigger',
	    backgroundColor: 'yellow',
	    //enabled: false
	});
	
	textField.addEventListener('touchstart', function() {
	    Ti.API.info('touchstart event fired');
	});
	
	textField.addEventListener('click', function() {
	    Ti.API.info('click event fired');
	});
	
	win.add(textField);
	win.open();

Comments

  1. Vijay Singh 2020-02-26

    PR - https://github.com/appcelerator/titanium_mobile/pull/11504
  2. Christopher Williams 2020-03-04

    Merged docs-only change to master, which will go live to docs site later today. Not sure if we want to mark this as closed "Not our Bug" or "Won't Fix" or something since it's an iOS/Apple issue?
  3. Vijay Singh 2020-03-04

    I think we should mark as 'Not our Bug' .
  4. Samir Mohammed 2020-06-11

    Closing ticket as 'Not our Bug'

JSON Source