1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    24
    Vote Rating
    1
    jfenety is on a distinguished road

      0  

    Default Unanswered: LoadMask with Ext.dom.Element as Taget

    Unanswered: LoadMask with Ext.dom.Element as Taget


    In trying to figure out why we can't have a LoadMask on the Ext.Body() anymore (even though it is only deprecated), I found this code in the LoadMask constructor. The ownerCt is never set if we are not a component. Is this a bug? This ripples down to the show method which assumes we have a ownerCt.

    Code:
    // Target is a Component        
    if (comp.isComponent) {
        me.ownerCt = comp;
        me.hidden = true;
        // Ask the component which element should be masked.            
        // Most will not have an answer, in which case this returns the document body            
        // Ext.view.Table for example returns the el of its owning Panel.            
        me.renderTo = me.getMaskTarget();
        me.external = me.renderTo === Ext.getBody();
        me.bindComponent(comp);
    } // Element support to be deprecated        
    else { //<debug>            
        if (Ext.isDefined(Ext.global.console)) {
            Ext.global.console.warn('Ext.LoadMask: LoadMask for elements has been deprecated, use Ext.dom.Element.mask & Ext.dom.Element.unmask');
        } //</debug>            
        comp = Ext.get(comp);
        me.isElement = true;
        me.renderTo = me.target;
    }

  2. #2
    Sencha - Ext JS Dev Team Phil Guerrant's Avatar
    Join Date
    May 2011
    Location
    Colorado
    Posts
    336
    Vote Rating
    93
    Answers
    29
    Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light Phil Guerrant is a glorious beacon of light

      0  

    Default


    If you need to mask an Ext.dom.Element, just use its mask method:

    Code:
        Ext.getBody().mask('Loading...');
    Phil Guerrant
    Ext JS - Development Team

Thread Participants: 1