3.2.0

2.5.5 Grid freezes after mouserightclick in Chrome (3.0.195.27)

I discovered in Chrome the AW Grid – example the grid on the www.activewidgets.com homepage and the examples in activewidgets-2.5.5/examples freeze after one mouserightclick on or outside the grid. In IE8 and FF3 the Grid works as aspected.

Also the scrollbars are frozen. Only after a grid.refresh the grid is live again…
Eric
October 17,
Yes, this is a bug in 2.5.5. Here is a temporary patch which should fix it -

function expandFocus(on){
    try {
        var e = this.getContent("box/focus").element();
        e.style.zIndex = on ? 1 : 0;
        e.style.width = on ? "100%" : "1px";
        e.style.height = on ? "100%" : "1px";
        e = null;
    }
    catch(err){
    }
}

if (AW.webkit){
    new AW.UI.Grid;

    AW.UI.Grid.prototype.setEvent("oncontextmenu", function(event){
        expandFocus.call(this, true);
        this.focus();
        this.setTimeout(function(){
            expandFocus.call(this, false);
        });
    });

    AW.UI.Grid.prototype.focus = function(){
        try {
            if (this.getControlDisabled()){
                return;
            }
            var e = this.getContent("box/focus").element();
            e.value = ".";
            e.select();
            e.focus();
            e = null;
        }
        catch(err){
        }
    };
}
Alex (ActiveWidgets)
October 22,
Forum: I have installed and tested this patch: works fine! Tested on IE8, FF3.5, Chrome 3.5 and Safari 4.0 (Opera 10 does not support oncontextmenu...)

Alex: thanks and regards.
October 23,
And after more thorough testing: after resizing the grid - with grid.resize(width,height) - a contextclick on rows in the made-larger-part of the grid results in weired scrolling. The forum-solution of July 18, 2008, the setStyle and setContentHeight just before the resize, solved this.

function resizeGridHeight( h ) {

obj.setStyle('height', h + 'px');
obj.setContentHeight(h - 4, "total");
obj.refresh();
}

Alex (ActiveWidgets)
Friday, July 18, 2008
Eric
October 24,

This topic is archived.

See also:


Back to support forum