[TIMOB-16457] MobileWeb: Buttons in navigation bar do not listen to click event
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2014-03-04T19:16:13.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | Release 3.3.0 |
Components | MobileWeb |
Labels | click, mobileweb, qe-closed-3.3.0, regression, rightnavbutton |
Reporter | Hani Hamadeh |
Assignee | Chris Barber |
Created | 2014-02-12T11:53:03.000+0000 |
Updated | 2014-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();
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.
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.
Dupe of TIMOB-16539.
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