Skip to content

Instantly share code, notes, and snippets.

@aaronksaunders
Last active August 29, 2015 14:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronksaunders/04caa6b1b2443e87430c to your computer and use it in GitHub Desktop.
Save aaronksaunders/04caa6b1b2443e87430c to your computer and use it in GitHub Desktop.
Weird Click Event Inconsistency with 3.5.0GA and Appcelerator NavigationWindow

Weird Click Event Inconsistency with 3.5.0GA and Appcelerator NavigationWindow

when you use this code, sometimes the click event on the button is ignored... nothing shows up in the alert when you click using the latest 3.5.0 SDK on IOS

This seems that it worked fine in 3.4.1

thanks to @skypanther I found that there is a known issue https://jira.appcelerator.org/browse/TIMOB-17367

// controller/index.js
function doClick(e) {
alert(e);
}
$.nav.open();
<Alloy>
<NavigationWindow id="nav" formFactor="handheld">
<Window id="win" class="container">
<!-- this implements the toolbar menu icons. remove if not needed -->
<!-- information on the possible native values for systemButton(icon): http://docs.appcelerator.com/titanium/3.0/#!/api/Titanium.UI.iPhone.SystemButton -->
<RightNavButtons>
<Button systemButton="Ti.UI.iPhone.SystemButton.ADD" onClick="doClick"/>
</RightNavButtons>
</Window>
</NavigationWindow>
</Alloy>
@nuno
Copy link

nuno commented Feb 2, 2015

@aaronksaunders Try this should work:

 <RightNavButton title="ADD" onClick="doClick" systemButton="ADD"/>

Full View:

<Alloy>
    <NavigationWindow id="nav" formFactor="handheld">
        <Window id="win" class="container">
             <RightNavButton title="ADD" onClick="doClick" systemButton="ADD"/>
        </Window>
    </NavigationWindow>
</Alloy>

@aaronksaunders
Copy link
Author

@nuno i still see the same behavior when using RightNavButtons so it appears that everything works fine with one button, but multiple buttons create an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment