Asset publisher's auto scroll should be configurable


  1. When clicking on an asset shown in an Asset Publisher, the asset's content can be configured to show the content in the same portlet or in a default one. In either case, the page will scroll to where the asset publisher is if it's located downwards in the page.
  2. Reproduction Steps:
    i) On a clean instance, create a widget page
    ii) Add several portlets to this page and an asset publisher at the bottom of the page in order to clearly see the scrolling
    iii) On this page set this asset publisher as the default asset publisher for this page
    iv) Create a basic web content and set this page as its display page
    v) Browse to this page and, in the asset publisher, click on this content's title
    Expected behavior: Have a way to configure if:
    (i) Users want the page to be scrolled to where the asset publisher is
    (ii) Users want to show the page from the top
    (iii) The default value of this configuration should be option 1
    Observed behavior: The page is scrolled down showing the asset publisher


  • Liferay DXP 7.1
  • Liferay DXP 7.2


  • The observed behavior in all versions of Liferay from DXP 7.1 is the expected behavior of the portal and it was introduced from LPS-70268 
  • After that LPS, evaluated the possibility of making said behavior customizable, though it was determined that if this feature is provided, propagating the change to maintenance branches such as 7.1 would be unfeasible.
  • However, this missing functionality is fixed in Liferay DXP 7.2 Fix Pack 15

Additional Information

  • As an alternative, the following is the part of the Liferay code which is currently responsible for scrolling in case of user want to evaluate the possibility of carrying out development in Liferay 7.1
    It would be the view asset-publisher-web / src / main / resources / META-INF / resources / view_content.jsp
    <aui:script> Liferay.once(
    function() {
    if (!Liferay.Browser.isIe()) {
    document.getElementById('p_p_id_<%= portletDisplay.getId() %>_').scrollIntoView();
    which scrolls with .scrollIntoView()
  • We have a channel called "Global Service Team" in case of further assistance regarding customization.
0 人中有 0 人觉得有帮助