1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    21
    Vote Rating
    0
    jastako is on a distinguished road

      0  

    Default Disappearing items in Ext.form.Panel in Chrome web browser

    Disappearing items in Ext.form.Panel in Chrome web browser


    Hi,

    So I found this bit strange behaviour, when implementing view, which inherits from 'Ext.form.Panel'. On mobile device (and also likely on emulator) it will work fine, but during development, I'm testing code against Chrome browser, as it is way more productive than deploying an *.apk over USB to device. So when I'm on Chrome, and switch Chrome Tab to some other site, and then come back to my app (in Chrome Tab), all the Ext.form.Panel items seem disappear, except toolbar, which is docked in the top.

    Any ideas?

    This is a code (CoffeeScript):
    Code:
    Ext.define 'MyView',
      extend: 'Ext.form.Panel'
      alias: 'widget.myview'
    
      config:
        items: \
        [
          {
            xtype: 'titlebar'
            docked: 'top'
            title: 'Some title'
            items: \
            [
              {
                xtype: 'button'
                ui: 'back'
                text: 'Back' # TODO: i18n
                align: 'left'
                handler: ->
                  this.fireEvent 'back'
              }
              {
                xtype: 'button'
                iconCls: 'search'
                iconMask: true
                align: 'right'
                handler: ->
                  Ext.Msg.alert 'You pressed me'
              }
            ]
          }
          {
            xtype: 'fieldset'
            title: 'Set itinerary details'
            items: \
            [
              {
                xtype: 'textfield'
              }
              {
                xtype: 'textfield'
              }
            ]
          }
        ]

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,142
    Vote Rating
    855
    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


    The code you have here should work fine, shouldn't be any reason for anything.
    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.

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    21
    Vote Rating
    0
    jastako is on a distinguished road

      0  

    Default


    I thought so. This is even more strange, as Ext.form.Panel inherits directly from Ext.Panel.

  4. #4
    Sencha User
    Join Date
    Oct 2012
    Posts
    11
    Vote Rating
    2
    the_Chameleon is on a distinguished road

      1  

    Default


    When i had developped my first application, this bug happened every time!
    It's coming from the positioning of the components.
    Try changing the layout of your panel.


    I advise you to try on several AVD because this bug also occurs on the tall or small screens.


    Good luck

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Posts
    21
    Vote Rating
    0
    jastako is on a distinguished road

      0  

    Default


    Thanks for info! If find any workaround (other than using Ext.Panel instead), will let you know.

  6. #6
    Sencha User
    Join Date
    Oct 2012
    Posts
    11
    Vote Rating
    2
    the_Chameleon is on a distinguished road

      1  

    Default


    try vbox layout :

    Code:
    config:
    layout:'vbox',
    items: \
    and set flex for the second item :
    Code:
    xtype: 'fieldset'
    flex:1
     title: 'Set itinerary details'