7
Vote

IE8 hangs up on toggle toolbar

description

Clicking on toggle button the browser hang up. The ribbon toggle correctly but the browser do not responde. I tested it in IE8 + Windows 7 Pro 64 bit.
I also test it in Chrome 10 and is ok.

comments

AFLuca wrote Apr 9, 2011 at 3:12 PM

test

AFLuca wrote Apr 9, 2011 at 3:19 PM

The problem is in function OfficeRibbonResizer() (OfficeWebUI\Resources\Common\Javascript\Ribbon_CollapseGroups.jsRibbon_CollapseGroups.js).

There is an infinite loop in these lines, because _TotalElementsWidth and _TotalElementsWidth are 0:
while ((_TotalElementsWidth > (_TotalContainerWidth - 100)) {
    HideElement();
    RacalculateWidth();
    //alert("elements : " + _TotalElementsWidth);
}
I solved it adding the condition (_TotalElementsWidth > 0)
while ((_TotalElementsWidth > 0) && (_TotalElementsWidth > (_TotalContainerWidth - 100))) {

wrote May 2, 2011 at 12:31 PM

FabioFranzini wrote May 3, 2011 at 8:12 AM

Sorry, but the error persist even with your fix.
I tried with IE9 and chrome 11.

wrote Aug 22, 2011 at 3:59 PM

wrote Sep 26, 2011 at 1:46 PM

wrote Oct 4, 2011 at 4:49 PM

FabioFranzini wrote Nov 28, 2011 at 9:53 PM

Sorry but your solution does not work...
I fund the solution:

while (_TotalElementsWidth > (_TotalContainerWidth - 100)) {
    var _CountGroup = _ActiveTab.find(".RibbonGroupContent").length;
    var _CountHideGroup = CountHideGroup();
    if (_CountHideGroup < _CountGroup) {
        HideElement();
        RacalculateWidth();
    }
    else {
        break;
    }
}
.....
.....

function CountHideGroup() {
var i = 0;
$(_ActiveTab.find(".RibbonGroupContent").get().reverse()).each(function () {
    var _element = $(this);
    if ((_element.attr("objType") == "Element") && (_element.css("display") == "none")) {
        i = i + 1;
    }
});

return i;
}

wrote Jun 9, 2012 at 6:26 PM

wrote Jun 28, 2012 at 8:22 PM

jpmoraes wrote Jun 29, 2012 at 12:54 PM

Thanks AFLuca! Thanks a lot!
It worked and the IE "locking" has been gone!

Best Regards

Jairo

wrote Feb 14, 2013 at 8:19 PM