js centering bug in tr:panelPopup --------------------------------- Key: TRINIDAD-911 URL: https://issues.apache.org/jira/browse/TRINIDAD-911 Project: MyFaces Trinidad Issue Type: Bug Reporter: Renzo Tomaselli
Hi, in method TrPanelPopup._centerOnScreen() the window height is computed for IE through document.body.clientHeight. This provides document height instead of window height, in case of IE 6+ in strict mode. The final result is an up-shifted panel, even beyond the top in case of panels higher than current document. Using document.documentElement.clientHeight does the right job, if returned value is not 0 (strict). Otherwise we are in quirks mode, thus use document.body.clientHeight. TrPanelPopup._centerOnScreen() should contain something like: ... if (this._isIE()) { var width = document.documentElement.clientWidth; // strict if (width == 0) width = document.body.clientWidth; // quirks loc = document.body.scrollLeft + ((width - element.clientWidth) / 2) - parentPos.x; element.style.left = loc + "px"; var heigth = document.documentElement.clientHeight; // strict if (heigth == 0) heigth = document.body.clientHeight; // quirks loc = document.body.scrollTop + ((height - element.clientHeight) / 2) - parentPos.y; element.style.top = loc + "px"; } ... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.