Legacy Knowledge Base
Published Jul. 2, 2025

Asset publisher's auto scroll should be configurable

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  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

Environment

  • Liferay DXP 7.1
  • Liferay DXP 7.2

Resolution

  • 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(
    'allPortletsReady',
    function() {
    if (!Liferay.Browser.isIe()) {
    document.getElementById('p_p_id_<%= portletDisplay.getId() %>_').scrollIntoView();
    }
    }
    );
    </aui:script>
    which scrolls with .scrollIntoView()
  • We have a channel called "Global Service Team" in case of further assistance regarding customization.
Did this article resolve your issue ?

Legacy Knowledge Base