Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9302] iOS: Can click for some area outside the visible boundaries of the navigation bar button

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2012-05-30T18:55:27.000+0000
Affected Version/sRelease 1.8.0.1, Release 1.8.2, Release 2.0.1
Fix Version/sn/a
ComponentsiOS
LabelsSupportTeam, api
ReporterVarun Joshi
AssigneeBlain Hamon
Created2012-05-29T15:52:21.000+0000
Updated2017-03-24T18:10:18.000+0000

Description

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

Attachments

FileDateSize
HitTest.zip2012-05-30T13:56:38.000+000024861
Screen Shot 2012-05-30 at 1.52.18 PM.png2012-05-30T13:56:38.000+00004928

Comments

  1. Blain Hamon 2012-05-30

    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.
  2. Blain Hamon 2012-05-30

    Clickable area effective and the native test that demonstrates it.
  3. Blain Hamon 2012-05-30

    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.
  4. Blain Hamon 2012-05-30

    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.
  5. Blain Hamon 2012-05-30

    The behavior is by iOS design, not by Titanium, and is intentional to compensate to large fingers.
  6. Lee Morris 2017-03-24

    Closing ticket as invalid with reference to the above comments.

JSON Source