Problem
The keyboard toolbar button for a TextArea within a ListView does not receive 'click' events
Test case
function keyboardToolbar() {
var flexSpace = Titanium.UI.createButton({
systemButton:Titanium.UI.iPhone.SystemButton.FLEXIBLE_SPACE
});
var done = Titanium.UI.createButton({
title: 'Done',
style: Titanium.UI.iPhone.SystemButtonStyle.DONE,
});
done.addEventListener('click', function(evt) {
Ti.API.debug('click');
});
var toolbar = Titanium.UI.iOS.createToolbar({
items:[flexSpace, done],
bottom: 0,
borderTop: true,
borderBottom: false
});
return toolbar;
}
var win = Ti.UI.createWindow({});
var lv = Ti.UI.createListView({
templates: {
textArea: {
properties: {
height: '200dp'
},
childTemplates: [
{
type: 'Ti.UI.TextArea',
bindId: 'textArea',
properties: {
top: 10,
left: 10,
width: '320dp',
height: '200dp',
suppressReturn: false,
keyboardToolbar: keyboardToolbar()
}
}
]
}
},
sections: [Ti.UI.createListSection({
items: [{
template: 'textArea'
}]
})]
});
win.add(lv);
win.open();
1. Run app with the code above
2. Focus on text area. The keyboard and keyboard toolbar will appear.
3. Tap on the 'Done' button in the keyboard toolbar
4. The message 'click' is not displayed in the log.
Hi, I have tested this issue. I also find the same issue. Keyboard toolbar button for TextArea within ListView does not receive 'click' events on iOS. This is a valid issue. *Environment*
Thanks
Any progress on this?
I am able to reproduce this issue with the following environment; iPhone 7 (10.2) Studio 4.9.0.201705302345 Ti SDK 6.1.1.v20170620103414 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
In above test case - done.addEventListener('click', function(evt) { Ti.API.debug('click'); }); For log debug API is called, which I think only print if app is in debug mode. If change "debug" api with "info" api as following code snippet- done.addEventListener('click', function(evt) { Ti.API.info('click'); }); It will print the text in console. So there is no problem in firing of "click" event. [~lmorris] Can you verify once at your end.
[~vijaysingh] I can verify this is correct. This was done with the following environment; Studio 4.9.1.201707200100 Ti SDK 6.1.2 GA Appc CLI 6.2.3 Ti CLI 5.0.14 Alloy 1.9.13 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131
As mentioned in comment, 'click' event is getting fired. debug API prints data only when app is in debug mode.
Closing as invalid.