Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-20043] iOS: Keyboard toolbar button for TextArea within ListView does not receive 'click' events

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2017-08-22T05:55:29.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsios
ReporterPhilippe Wueger
AssigneeVijay Singh
Created2015-09-30T08:26:15.000+0000
Updated2017-08-22T21:29:46.000+0000

Description

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.

Comments

  1. Aminul Islam 2015-10-29

    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*
       Appcelerator Studio, build: 5.1.0.201508271018
       iOS 9.0
       Operating System
         Name                        = Mac OS X
         Version                     = 10.10.5
         Architecture                = 64bit
         # CPUs                      = 4
         Memory                      = 8589934592
       Node.js
         Node.js Version             = 0.10.37
         npm Version                 = 1.4.28
       Titanium CLI
         CLI Version                 = 5.0.5
       Titanium SDK
         SDK Version                 = 5.0.2.GA
         SDK Path                    = /Users/Library/Application Support/Titanium/mobilesdk/osx/5.0.2.GA
         Target Platform             = iphone
       
    Thanks
  2. Philippe Wueger 2015-11-16

    Any progress on this?
  3. Lee Morris 2017-06-20

    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
  4. Vijay Singh 2017-08-02

    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.
  5. Lee Morris 2017-08-09

    [~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
  6. Vijay Singh 2017-08-22

    As mentioned in comment, 'click' event is getting fired. debug API prints data only when app is in debug mode.
  7. Lee Morris 2017-08-22

    Closing as invalid.

JSON Source