Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    May 2012
    Posts
    4
    Vote Rating
    1
    Romain Pennes is on a distinguished road

      0  

    Default [Bug] Z-Index increment on TabPanel animations

    [Bug] Z-Index increment on TabPanel animations


    Hello,

    I've been using Sencha Touch in a professional environment for some time now and I'm fully satisfied with it. The product is absolutely great.

    I post today because it seems there is a bug in the 'before' methods of the animations('fade', 'slide', 'pop').
    In my case, this methods are called whenever the user tabs between panels of a TabPanel component.

    Code:
    curZ = el.getStyle('z-index') == 'auto' ? 0 :el.getStyle('z-index')
    This line exists for each of the 3 animations. It seems to get the current z-index of a panel, and adds 1 at the end.

    I think the normal behavior would be to have an incremented z-index (0, 1, 2, 3...).
    Instead of incremental, the z-index does the following : (0, 1, 11, 111...).

    Which means that if I tab about 6 or 7 times in a row, the z-index starts to be very high and MessageBox (in my case) appears under the panels (because I believe it has a z-index of 10.000).

    I could fix the problem by replacing the code above by the following.

    Code:
    curZ = el.getStyle('z-index') == 'auto' ? 0 : Math.round(el.getStyle('z-index'))
    Hope I could be of some help.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,408
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
    parseInt(someString, 10)
    is a better way than Math.round
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

Tags for this Thread