davebalmer / jo

Jo (0.5.0) is a thin (~16K) candy shell for making HTML5 apps. Jo works with: PhoneGap, Chrome, Safari, Opera, FireFox, iOS, Android, BlackBerry 10, Tizen, & Windows Phone 8+. Features include skinnable UI widgets, a clean event model and a light data layer.
MIT License
1.2k stars 180 forks source link

joNavbar can't be extended #49

Open ukabu opened 12 years ago

ukabu commented 12 years ago

There is an issue with joNavbar that prevent it from being extended (subclassed).

The listener for the back button is a function called back. But in the constructor function, it is replaced by the back property which hold the reference to the joBackButton.

The code works because when adding the event listener, the reference to the function has not be called yet, but this cause issues when extending the joNavbar.

The listener should be named goBack instead of back (or any other name that is not back).

davebalmer commented 12 years ago

Good catch! Moving this weekend, will get on it next week unless someone else gets to it first.