Steps to Reproduce
1. Run the app.js below:
{noformat}
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var tabGroup = Ti.UI.createTabGroup();
var tab1 = Ti.UI.createTab({
title : 'Tab 1',
window : win
});
var button = Ti.UI.createButton({
top : 20,
width : 100,
height : 50,
title : 'Click Me'
});
win.add(button);
button.addEventListener('click', function() {
var win1 = Ti.UI.createWindow({
backgroundColor : 'red',
navBarHidden : false,
});
var back = Ti.UI.createButton({
title : 'Back',
style: Titanium.UI.iPhone.SystemButtonStyle.DONE
});
win1.setLeftNavButton(back);
back.addEventListener('click', function() {
win1.close();
});
win1.open({
modal : true
});
});
tabGroup.addTab(tab1);
tabGroup.open();
{noformat}
2. Click on the "Click Me" button.
3. Now click on the back button (a bit outside the visible boundaries of it i.e to the left, right, bottom)
Expected Result
The window should not close
Actual Result
The window closes. Also happens on the rightNavbutton too. Confirmed this even with version 1.8.0.1 and 1.8.2 of the SDK.
Video Link
http://youtu.be/vxPAUFfJstk
There is about 16 pixels outside the edges of a button that is still considered valid clickable area in a navigation bar button. This is by design from Apple itself. Included is a screenshot of the area considered 'button clicked' as well as the native project that demonstrates it.
Clickable area effective and the native test that demonstrates it.
Will test to see if the same clickable region is happening. If so, closing as invalid. If the clickable region is different from native, will be looking deeper.
Verified that this behavior is consistent with native. Left nav button has a larger horizontal margin than right nav button, but in all cases, no Titanium code is called, not even for hit test. In other words, marking this invalid as this is by design by Apple.
The behavior is by iOS design, not by Titanium, and is intentional to compensate to large fingers.
Closing ticket as invalid with reference to the above comments.