ICEfaces
  1. ICEfaces
  2. ICE-2967

Incorrect positioning of dynamically positioned components in Liferay portal.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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:
      Hide
      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;
      }
      Show
      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; }

      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.

        Issue Links

          Activity

          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16372 Wed Apr 09 16:14:52 MDT 2008 deryk.sinotte ICE-2967: Adding a check to the JavaScript so that no error is logged when we are not running on Liferay.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/common-src/org/icefaces/application/showcase/util/ContextUtilBean.java
          Repository Revision Date User Message
          ICEsoft Public SVN Repository #16344 Wed Apr 09 00:49:42 MDT 2008 deryk.sinotte ICE-2967: Adding a fix, via JavaScript, to override the relative position of a DIV in Liferay so that popup elements are positioned more accurately.
          Files Changed
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_DragAndDrop.jspx
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/common-src/org/icefaces/application/showcase/util/ContextUtilBean.java
          Commit graph DEL /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/images
          Commit graph DEL /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/js
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_Panel_Tooltip.jspx
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_Panel_Popup.jspx
          Commit graph MODIFY /icefaces/trunk/icefaces/samples/component-showcase2/portlets/web/Components_Menubar.jspx

            People

            • Assignee:
              Unassigned
              Reporter:
              Deryk Sinotte
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: