Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1560] iOS - Button doesn't fire dblclick event

GitHub Issuen/a
TypeBug
PriorityTrivial
StatusClosed
ResolutionCannot Reproduce
Resolution Date2012-07-20T13:15:37.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelslook1
ReporterSindre Sorhus
AssigneeNeeraj Gupta
Created2011-04-15T02:56:03.000+0000
Updated2017-03-28T17:11:41.000+0000

Description

Test case from http://pastebin.com/YPp9LCFr:
Ti.UI.setBackgroundColor('#fff');

// create navgroup
var win = Ti.UI.createWindow();

var win1 = Ti.UI.createWindow();

var nav = Ti.UI.iPhone.createNavigationGroup({
   window: win1
});

win.add(nav);

win.open();



var testButton = Ti.UI.createButton({
	title: 'testButton',
	width: 100,
	height: 30
});

var label = Ti.UI.createLabel({
	text: 'event'
});

testButton.addEventListener('dblclick', function() {
	Ti.API.info('dblclick');
	label.text = 'dblclick';
});

win1.add(label);
win1.add(testButton);

Comments

  1. Sindre Sorhus 2011-04-15

    Here's a temporary workaround for anyone else haivng the same problem: http://gist.github.com/525623">http://gist.github.com/525623

  2. Jon Alter 2011-04-15

    There is another customer interested in this fix.

    Associated Helpdesk Ticket

    http://developer.appcelerator.com/helpdesk/view/72441#c345131">http://developer.appcelerator.com/helpdesk/view/72441#c345131

  3. Sindre Sorhus 2011-10-19

       Ti.UI.setBackgroundColor('#fff');
       // create navgroup
       var win = Ti.UI.createWindow();
       var win1 = Ti.UI.createWindow();
       var nav = Ti.UI.iPhone.createNavigationGroup({
         window: win1
       });
       win.add(nav);
       win.open();
       var testButton = Ti.UI.createButton({
         title: 'testButton',
         width: 100,
         height: 30
       });
       var label = Ti.UI.createLabel({
         text: 'event'
       });
       testButton.addEventListener('dblclick', function () {
         Ti.API.info('dblclick');
         label.text = 'dblclick';
       });
       win1.add(label);
       win1.add(testButton);
       
  4. Sindre Sorhus 2011-10-19

    Just tried the test case again and the issue is still noticeable in Titanium Mobile 1.7.3 and iOS 5.
  5. Sindre Sorhus 2012-01-02

    Any updates?
  6. Vishal Duggal 2012-07-20

    Tested on latest master
  7. Neeraj Gupta 2012-07-20

    Does not reproduce with release 2.1.0.
  8. Lee Morris 2017-03-28

    Closing ticket as I am unable to reproduce this issue with the following environment; iPhone 7 (10.2) MacOS 10.11.6 (15G31) Studio 4.8.1.201612050850 Ti SDK 6.0.3 GA Appc NPM 4.2.8 Appc CLI 6.1.0 Ti CLI 5.0.11 Alloy 1.9.5 Arrow 1.10.1 Xcode 8.2 (8C38) Node v4.6.0 Java 1.7.0_80

JSON Source