This project is archived and is in readonly mode.

#204 ✓hold

Mask resize event not implemented

Reported by philthathril | December 3rd, 2009 @ 05:30 PM | in

In the Mask utility, if I implement the "resize" method, it's only called during the initial show of the mask. If I resize the browser window (which is supposed to call the resize method again), my implemented resize method does not get called - the event is defined in the default "show" method.

    resize: function (x,y) {
        var opt = {
            styles: ['padding', 'border']
        if (this.options.maskMargins) opt.styles.push('margin');
        var dim =;
        var win = window.getScrollSize(); // changed from getSize()
        if ( == document.body) {
            if (dim.totalHeight < win.y) dim.totalHeight = win.y;
            if (dim.totalWidth < win.x) dim.totalWidth = win.x;
            width: $pick(x, dim.totalWidth, dim.x),
            height: $pick(y, dim.totalHeight, dim.y)
        return this;

When the mask first shows, I get the alert "resizing". If I actually resize the window, I get no alert.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions