Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16457] MobileWeb: Buttons in navigation bar do not listen to click event

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2014-03-04T19:16:13.000+0000
Affected Version/sRelease 3.2.1
Fix Version/sRelease 3.3.0
ComponentsMobileWeb
Labelsclick, mobileweb, qe-closed-3.3.0, regression, rightnavbutton
ReporterHani Hamadeh
AssigneeChris Barber
Created2014-02-12T11:53:03.000+0000
Updated2014-06-19T12:44:43.000+0000

Description

On Mobile Web: Button in the navigation bar not displaying the alert when clicked. Works fine on Ti 3.1.3, broken on Ti 3.2.0 and 3.2.1

var tabg = Ti.UI.createTabGroup({
	backgroundColor:'white'
});

var win = Ti.UI.createWindow({

});


var tab1 = Ti.UI.createTab({
	title:'tab1',
	window:win
});


var btn = Ti.UI.createButton({
	width: Ti.UI.SIZE,
	height: Ti.UI.SIZE,
	title:'Done'
});


btn.addEventListener('click', function(){
	alert('hello');
});


win.setRightNavButton(btn);

var btn2 = Ti.UI.createButton({
	width: Ti.UI.SIZE,
	height: Ti.UI.SIZE,
	title:'Done'
});


btn2.addEventListener('click', function(){
	alert('hello');
});

win.add(btn2);

tabg.addTab(tab1);
tabg.open();

Comments

  1. Ritu Agrawal 2014-02-13

    Moving this ticket to engineering as I can reproduce this issue with 3.2.0 and 3.2.1 releases. This issue does not occur with 3.1.3 release so it is a regression.
  2. Bogdan Pankiv 2014-02-28

    The same issue in AlertDialog. Sample code: var dialog = Ti.UI.createAlertDialog({ cancel : 1, buttonNames : [L("ok"), L("cancel")], title : L("logout"), message : L("logout_question") }); dialog.addEventListener("click", function(e) { alert("onclick"); }); dialog.show(); This doesn't work in KitchenSink too (Base UI > Views > Alert Dialog). Click on any dialog type and all buttons are not clickable.
  3. Chris Barber 2014-03-04

    Dupe of TIMOB-16539.
  4. Olga Romero 2014-04-23

    Tested and verified the fix with: Appcelerator Studio, build: 3.3.0.201404221437 Titanium SDK, build 3.3.0.v20140418162516 Node.JS Version: v0.10.13 NPM Version: 1.3.2 ├── acs@1.0.14 ├── alloy@1.4.0-dev ├── node-appc@0.2.0 ├── npm@1.3.2 ├── titanium@3.3.0-dev └── titanium-code-processor@1.1.1-beta1 npm -g ls titanium: /usr/local/lib └── titanium@3.3.0-dev (git://github.com/appcelerator/titanium.git#93414d143051df4578b7aa42670008e5ef02c422) XCode Version: 5.1.1 browser: Safari Version 7.0.3

JSON Source