[TIMOB-27717] iOS: 'click' event in Ti.UI.TextField is not working for iOS >= 11.x
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2020-06-11T11:00:32.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | engTriage, textfield |
Reporter | Vijay Singh |
Assignee | Vijay Singh |
Created | 2020-01-10T18:56:19.000+0000 |
Updated | 2020-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();
PR - https://github.com/appcelerator/titanium_mobile/pull/11504
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?
I think we should mark as 'Not our Bug' .
Closing ticket as 'Not our Bug'