You found a bug! We've classified it as EXTJSIV-8497 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User Daniil's Avatar
    Join Date
    Jun 2010
    Location
    Saint-Petersburg, Russia
    Posts
    745
    Vote Rating
    67
    Daniil is just really nice Daniil is just really nice Daniil is just really nice Daniil is just really nice

      0  

    Default [4.2.0 beta 2] Portlet doClose doesn't return opacity to 1

    [4.2.0 beta 2] Portlet doClose doesn't return opacity to 1


    REQUIRED INFORMATION

    Ext version tested:
    • Ext 4.2.0 beta 2
    Browser versions tested against:
    • Any
    DOCTYPE tested against:
    • Any
    Description:
    • A Portlet's doClose method doesn't return opacity to 1. It is actual if closeAction of a Portlet is "hide". A show call doesn't cause a Portlet to be actually appeared , because its opacity is 0.
    Code:
    doClose: function() {
        if (!this.closing) {
            this.closing = true;
            this.el.animate({
                opacity: 0,
                callback: function(){
                    this.fireEvent('close', this);
                    this[this.closeAction]();
                },
                scope: this
            });
        }
    }
    Steps to reproduce the problem:
    • Set a portlet's closeAction to "hide"
    • Close the portlet clicking its "X" tool
    • Call the portlet's show method
    The result that was expected:
    • The Portlet appears
    The result that occurs instead:
    • The Portlet does't appear (because of opacity is 0)
    Test Case:

    I will provide if you really need a sample.

    HELPFUL INFORMATION

    Possible fix:
    • Return opacity back to 1 in the animation callback if closeAction is "hide".
    Code:
    doClose : function () {
        if (!this.closing) {
            this.closing = true;
            this.el.animate({
                opacity  : 0,
                callback : function(){
                    this.fireEvent('close', this);
                    this[this.closeAction]();
                    if(this.closeAction == "hide") {
                        this.el.setOpacity(1, false);
                    }
                },
                scope : this
            });
        }
    }
    Ext.NET - ASP.NET for Ext JS
    MVC and WebForms
    Examples | Twitter

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,118
    Vote Rating
    453
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


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