natecavanaugh/liferay-portal — pull request #854 by lipusz (2012-10-16 13:10:19+00:00)
Title: LPS-30384 CKEditor dialog windows are incorrectly positioned when the editor instance is running in a dialog panel or pop-up

Hello, Nate,

I'm sending this pull request to you with Daniel Kocsis's permission, because you and I have already talked about this issue, moreover Máté and Zsolt Berentey are out of office this week.

As I've written in my reply email, I have successfully applied "CKEDITOR.dom.element.getDocumentPosition()" method to get the X and Y coordinates of the parent editor instance.

To make the behavior more user-friendly, this fix ensures CKEditor dialog windows to be centered relatively to the parent editor instance, but only in cases when the parent window of the dialog is an iframe. Since this problem doesn't occur when the entry is opened to edit from the Control Panel, I added a condition to preserve the original behavior in this case.

Please, review my changes and let me know if you've any notes, advices and I can re-send the PR.
Because this LPS belongs to a customer LPP ticket, I'd be grateful to you for reviewing it asap.

Thank you in advance.

Regards,
Tibor