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
Certain component elements are positioned incorrectly when running as portlets in Liferay. The behavior is only manifested when signed in - not when using Liferay as a guest. The problem is that the dynamically positioned components - like submenus, draggable ghosts, tooltips, popupPanel etc. - are much farther down the page than the mouse. The offset calculation is off by a wide margin.
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.
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
Deryk Sinotte
created issue -
Deryk Sinotte
made changes -
Deryk Sinotte
made changes -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16344 | Wed Apr 09 00:49:42 MDT 2008 | deryk.sinotte | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_DragAndDrop.jspx
MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/common-src/org/icefaces/application/showcase/util/ContextUtilBean.java DEL /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/images DEL /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/js MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_Panel_Tooltip.jspx MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_Panel_Popup.jspx MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_Menubar.jspx |
Ken Fyten
made changes -
Summary | Positioning of certain component popup elements in Liferay is incorrect when signed in. | Incorrect positioning of dynamically positioned components in Liferay portal. |
Workaround Description |
The following script can be used to work-around the Liferay "style='position: relative;'" issue. This script is safe to call many times so it can be added to each ICEfaces portlet as required: if (Liferay.Columns && !Liferay.Columns._ICE_positionSet) { Liferay.Util.actsAsAspect(Liferay.Columns); Liferay.Columns.after( 'add', function(portlet) { jQuery(portlet).css('position', 'static'); } ); Liferay.Columns._ICE_positionSet = true; } |
|
Workaround Exists | [Yes] | |
Component/s | Components [ 10012 ] | |
Affects Version/s | 1.7 [ 10080 ] | |
Affects Version/s | 1.7RC1 [ 10123 ] | |
Description | Certain component elements are positioned incorrectly when running as portlets in Liferay. The behaviour is only manifested when signed in - not when using Liferay as a guest. The problem is that the popup up components - like submenus, draggable ghosts, tooltips, etc. - are much farther down the page than the mouse. The offset calculation is off by a wide margin. But those only happens when signed in. |
Certain component elements are positioned incorrectly when running as portlets in Liferay. The behavior is only manifested when signed in - not when using Liferay as a guest. The problem is that the dynamically positioned components - like submenus, draggable ghosts, tooltips, popupPanel etc. - are much farther down the page than the mouse. The offset calculation is off by a wide margin. 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. |
Ken Fyten
made changes -
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Won't Fix [ 2 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #16372 | Wed Apr 09 16:14:52 MDT 2008 | deryk.sinotte | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/samples/component-showcase2/common-src/org/icefaces/application/showcase/util/ContextUtilBean.java
|
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) {
{ jQuery(portlet).css('position', 'static'); }Liferay.Util.actsAsAspect(Liferay.Columns);
Liferay.Columns.after(
'add',
function(portlet)
);
}
(Also, make sure this code runs outside of any sort of onLoad function)."