This commit is created to add a custom onbackclick attribute for titlebar,
The logic is
If there's no onbackclick attribute defined for the titlebar, then bb.pushScreen() will be invoked, that's the same as former behavior.
If there's any onbackclick attribute defined for the titlebar, then the code defined in onbackclick will be invoked, like onactionclick.
This request add another possibility to control the page flow, using cancel button in the titlebar.
Add onbackclick support for title bar to hook custom logic to the bac…
Add feature to set Selected Tab without invoke defined onclick of the…
Would it be possible to split these two changes into separate pull requests. It would be easier to review them separately.
Revert "Add feature to set Selected Tab without invoke defined onclic…
…k of the actionbar"
This reverts commit 1785f7b.
According to my test, there's a highlight issue regarding the selected tab push, so it was reverted back,
And only one commit exists in this request.
One of the main things we want to do with the back button is ensure that it is always a back button. If we allow for custom onbackbutton events, I want to make sure that we call that custom code and then also call popScreen() to move back.
This would allow you to do custom code when back is clicked, but not change the fact that the screen will go back. If we add this I would also suggest adding the same event to the actionbar
Sounds reasonable, I will change it accordingly and then submit the request again.
Thanks for you review :)