-
15 Apr 2012 3:17 AM #1
navigationview back button does not hide if animation is not present (2.0.1 RC)
navigationview back button does not hide if animation is not present (2.0.1 RC)
If animations are not defined in naviation/Bar.js, function doChangeView
/**
* @private
*/
doChangeView: function(view, hasPrevious, reverse) {
var me = this,
leftBox = me.leftBox,
leftBoxElement = leftBox.element,
titleComponent = me.titleComponent,
titleElement = titleComponent.element,
backButton = me.getBackButton(),
titleText = me.getTitleText(),
backButtonText = me.getBackButtonText(),
animation = view.getLayout().getAnimation(),
animated = animation && animation.isAnimation && view.isPainted(),
properties, leftGhost, titleGhost, leftProps, titleProps;
if (animated) {
leftGhost = me.createProxy(leftBox.element);
leftBoxElement.setStyle('opacity', '0');
backButton.setText(backButtonText);
backButton[hasPrevious ? 'show' : 'hide']();
the bottom has the code
if (hasPrevious) {
backButton.setText(backButtonText);
backButton.show();
}
but also needs the code as follows
if (hasPrevious) {
backButton.setText(backButtonText);
backButton.show();
}
else
{
backButton.hide();
}
to hide the back button. Current examples have view.getLayout().getAnimation() defined so do not run into this, once this is null this case is triggered and when coming back to the first element in the stack the back button is still visible.
-
15 Apr 2012 7:04 AM #2
more information on this ...
more information on this ...
The workaround is to add an animation, but had removed it as I found that this made the Android native app less responsive and ideally want to remove the animation to make the transitions as fast as they can be. I can work around this by fixing the code and moving along, but good to get it fixed in the next dot release.
Anand
-
16 Apr 2012 9:01 AM #3Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
Thank you for the report.
-
16 Apr 2012 10:36 AM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Redwood City, California
- Posts
- 3,653
- Vote Rating
- 14
This has been fixed for the next release.
Success! Looks like we've fixed this one. According to our records the fix was applied for
TOUCH-2761
in
Sprint 21 (2.0.1).


Reply With Quote