Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-4485 in a recent build.
  1. #1
    Sencha User MrNickBarker's Avatar
    Join Date
    Apr 2013
    Posts
    19
    Vote Rating
    0
    MrNickBarker is on a distinguished road

      0  

    Default titlebar.remove() ignores destroy argument

    titlebar.remove() ignores destroy argument


    REQUIRED INFORMATION




    Ext version tested:
    • Sencha Touch 2.2.0
    Browser versions tested against:
    • Chrome 26.0.1410.65 (Mac OS X)
    Description:
    • Titlebar remove(item, destroy) ignores destroy argument and the object gets destroyed after removal.
    Steps to reproduce the problem:
    • Create button
    • Add it to a titlebar
    • Remove button with destroy=false
    The result that was expected:
    • Unchanged button
    The result that occurs instead:
    • Destroyed button
    Test Case:


    Code:
    var tb = this.getTitlebar();
    var button = Ext.create('Ext.Button', {
        text:'Button'
    });
    
    tb.add(button);
    tb.remove(button, false);
    
    console.log(button.isDestroyed); // logs true
    tb.add(button); // Uncaught TypeError: Cannot read property 'dom' of null

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


    Thanks for the report! I have opened a bug in our bug tracker.

Thread Participants: 1

Tags for this Thread