Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.7
-
Fix Version/s: None
-
Component/s: ICE-Components
-
Labels:None
-
Environment:liferay portal portlet
-
Workaround Exists:Yes
-
Workaround Description:
Description
The cause of this problem is a behavior in Liferay that injects relative positioning into a style attribute on the page container when you login, apparently to support LIferay's own drag and drop mechanism.
Liferay is going to be changing this behavior in their upcoming 5.1 release, but you can use the workaround noted here in the meantime.
Issue Links
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
The problem is that, when signed in, a different set of styles is in effect (at least with the Jedi theme that comes with Liferay 4.4.2). When you are signed in with the test account, there is a style applied to a div containing the portlet content.
An example of the problematic style is:
<div class="portlet-boundary portlet-boundary_components_menubar_WAR_componentshowcase_" id="p_p_id_components_menubar_WAR_componentshowcase_INSTANCE_ZZpe_" style="top: 0pt; left: 0pt; position: relative;">
It's the position:relative that causes the grief with our own component positioning. The solution that was recommended to us directly from the Liferay UI development team involves adding a touch of JavaScript. This is the quote from Liferay:
"For more information about using this technique, check out my blog entry here:
http://www.liferay.com/web/ncavanaugh/home/blogs/hooking_into_liferay_s_javascript_functions
And here's the code:
if (Liferay.Columns) {
Liferay.Util.actsAsAspect(Liferay.Columns);
Liferay.Columns.after(
'add',
function(portlet)
);
}
(Also, make sure this code runs outside of any sort of onLoad function)."
Just capturing an additional comment from Liferay. Another suggestion was made to simply add the following style to the portlet content where the problem occurs:
.portlet-boundary
{ position: static !important; }