<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Liferay 7.2 CE, automatic scroll to full content asset: how to disable it?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117612690" />
  <subtitle>Liferay 7.2 CE, automatic scroll to full content asset: how to disable it?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=117612690</id>
  <updated>2026-04-04T20:53:03Z</updated>
  <dc:date>2026-04-04T20:53:03Z</dc:date>
  <entry>
    <title>RE: Liferay 7.2 CE, automatic scroll to full content asset: how to disable</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121177495" />
    <author>
      <name>Jonathan HELL</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121177495</id>
    <updated>2021-10-01T15:33:31Z</updated>
    <published>2021-10-01T14:14:17Z</published>
    <summary type="html">&lt;p&gt;Here is my awful solution for this awful behaviour.&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-javascript"&gt;Liferay.Browser.isIe = () =&amp;gt; true;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This script has to be called as late as possible and this to avoid
  other Liferay scripts to consider your browser as IE. As the
  &amp;quot;allPortletsReady&amp;quot; event is fired after the DOM is rendered,
  this should'nt be a problem. &lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;
&lt;p&gt;J.&lt;/p&gt;</summary>
    <dc:creator>Jonathan HELL</dc:creator>
    <dc:date>2021-10-01T14:14:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE, automatic scroll to full content asset: how to disable</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120056727" />
    <author>
      <name>Eric DARIEL</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120056727</id>
    <updated>2025-10-21T05:12:37Z</updated>
    <published>2020-10-06T17:49:48Z</published>
    <summary type="html">Thanks for your post.&lt;br /&gt;&lt;span style="font-size: 14px;"&gt;I will try this... &lt;/span&gt;Eric. </summary>
    <dc:creator>Eric DARIEL</dc:creator>
    <dc:date>2020-10-06T17:49:48Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE, automatic scroll to full content asset: how to disable</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120049030" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120049030</id>
    <updated>2020-10-05T09:20:27Z</updated>
    <published>2020-10-05T09:20:27Z</published>
    <summary type="html">Hi Henry, we solved the same way long ago. Thank you anyway!</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2020-10-05T09:20:27Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE, automatic scroll to full content asset: how to disable</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119947759" />
    <author>
      <name>Cédric Henry</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119947759</id>
    <updated>2020-09-15T14:30:58Z</updated>
    <published>2020-09-15T14:30:58Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Sorry&amp;nbsp;for being late on this&amp;nbsp;post.&lt;br&gt;&lt;br&gt;This the&amp;nbsp;only&amp;nbsp;way we&amp;nbsp;found&amp;nbsp;to get rid of that&amp;nbsp;using&amp;nbsp;a classic "widget page"&amp;nbsp;(approved&amp;nbsp;by the&amp;nbsp;support, overwise we would&amp;nbsp;need&amp;nbsp;to&amp;nbsp;use&amp;nbsp;display page)&amp;nbsp;:&amp;nbsp;create&amp;nbsp;a&amp;nbsp;fragment&amp;nbsp;to&amp;nbsp;override&amp;nbsp;the&amp;nbsp;jsp&amp;nbsp;which&amp;nbsp;provide&amp;nbsp;the&amp;nbsp;anchor.&lt;br&gt;&lt;br&gt;Notes :&amp;nbsp;removing&amp;nbsp;"" doesn't work.&amp;nbsp;The anchor effect is&amp;nbsp;provided&amp;nbsp;by a&amp;nbsp;javascript.To do that, follow the procedure detailed below.&amp;nbsp;&lt;br&gt;&lt;br&gt;1)&amp;nbsp;Create&amp;nbsp;a new fragment module which I will&amp;nbsp;call&amp;nbsp;"asset-publisher-fragment" (you&amp;nbsp;can&amp;nbsp;create&amp;nbsp;a&amp;nbsp;mvc-portlet&amp;nbsp;if&amp;nbsp;you&amp;nbsp;don't have the fragment template in&amp;nbsp;you&amp;nbsp;IDE,&amp;nbsp;just&amp;nbsp;remove&amp;nbsp;every Java&amp;nbsp;classes&amp;nbsp;and .jsp&amp;nbsp;and only keep the&amp;nbsp;META-INF.ressources&amp;nbsp;folder&amp;nbsp;empty.&lt;br&gt;&lt;br&gt;2)&amp;nbsp;Edit&amp;nbsp;the&amp;nbsp;bnd.bnd&amp;nbsp;file to&amp;nbsp;add&amp;nbsp;the proper "Fragment-Host" :&lt;br&gt;&lt;pre&gt;&lt;code&gt;Bundle-Name: asset-publisher-fragment
Bundle-SymbolicName: asset.publisher.fragment
Bundle-Version: 1.0.0
Fragment-Host: com.liferay.asset.publisher.web&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;3) Create a new file "view_content.jsp" in&amp;nbsp; "META-INF.ressources" with the following content :&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;amp;lt;%--
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
--%&amp;amp;gt;

&amp;amp;lt;%@ include file="/init.jsp" %&amp;amp;gt;

&amp;lt;liferay-util:dynamic-include key="com.liferay.asset.publisher.web#/view_content.jsp#pre" /&amp;gt;

&amp;amp;lt;%
AssetPublisherViewContentDisplayContext assetPublisherViewContentDisplayContext = new AssetPublisherViewContentDisplayContext(renderRequest, assetPublisherDisplayContext.isEnablePermissions());
if (Validator.isNotNull(assetPublisherViewContentDisplayContext.getReturnToFullPageURL())) {
portletDisplay.setURLBack(assetPublisherViewContentDisplayContext.getReturnToFullPageURL());
}
%&amp;amp;gt;

&amp;lt;c:choose&amp;gt;
&amp;lt;c:when test="&amp;lt;%= assetPublisherViewContentDisplayContext.isAssetEntryVisible() %&amp;gt;"&amp;gt;

&amp;amp;lt;%
AssetEntry assetEntry = assetPublisherViewContentDisplayContext.getAssetEntry();
AssetRenderer&amp;lt;!--?--&amp;gt; assetRenderer = assetPublisherViewContentDisplayContext.getAssetRenderer();
request.setAttribute("view.jsp-assetEntry", assetEntry);
request.setAttribute("view.jsp-assetRenderer", assetRenderer);
request.setAttribute("view.jsp-assetRendererFactory", assetPublisherViewContentDisplayContext.getAssetRendererFactory());
request.setAttribute("view.jsp-print", assetPublisherViewContentDisplayContext.getPrint());
request.setAttribute("view.jsp-showBackURL", assetPublisherViewContentDisplayContext.isShowBackURL());
PortalUtil.addPortletBreadcrumbEntry(request, assetRenderer.getTitle(locale), currentURL);
String summary = StringUtil.shorten(assetRenderer.getSummary(liferayPortletRequest, liferayPortletResponse), assetPublisherDisplayContext.getAbstractLength());
PortalUtil.setPageDescription(summary, request);
PortalUtil.setPageKeywords(assetHelper.getAssetKeywords(assetEntry.getClassName(), assetEntry.getClassPK()), request);
PortalUtil.setPageTitle(assetRenderer.getTitle(locale), request);
%&amp;amp;gt;

&amp;lt;liferay-util:include page="/view_asset_entry_full_content.jsp" servletContext="&amp;lt;%= application %&amp;gt;" /&amp;gt;
&amp;lt;/c:when&amp;gt;
&amp;lt;c:otherwise&amp;gt;
&amp;lt;liferay-util:include page="/error.jsp" servletContext="&amp;lt;%= application %&amp;gt;" /&amp;gt;
&amp;lt;/c:otherwise&amp;gt;
&amp;lt;/c:choose&amp;gt;

&amp;lt;liferay-util:dynamic-include key="com.liferay.asset.publisher.web#/view_content.jsp#post" /&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;Notes : we just removed thisJS part wich annoy us :&lt;br&gt;&lt;pre&gt;&lt;code&gt;&amp;lt;aui:script&amp;gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;Liferay.once('allPortletsReady', function() {
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;if (!Liferay.Browser.isIe()) {
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;document
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;.getElementById('p_p_id_&amp;amp;lt;%=&amp;amp;nbsp;portletDisplay.getId()&amp;amp;nbsp;%&amp;amp;gt;_')
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;.scrollIntoView();
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;}
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;});
&amp;amp;nbsp;&amp;lt;/aui:script&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;4) Deploy the module and, that's it.&amp;nbsp;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Cédric Henry</dc:creator>
    <dc:date>2020-09-15T14:30:58Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE, automatic scroll to full content asset: how to disable</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117646529" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117646529</id>
    <updated>2019-11-02T15:33:12Z</updated>
    <published>2019-11-02T15:33:12Z</published>
    <summary type="html">Yes, this behaviour is indeed very annoying...let&amp;#39;s see if someone have a solution. In the meantime I&amp;#39;ll try to get a workaround...</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-11-02T15:33:12Z</dc:date>
  </entry>
  <entry>
    <title>RE: Liferay 7.2 CE, automatic scroll to full content asset: how to disable</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117648109" />
    <author>
      <name>Eric DARIEL</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117648109</id>
    <updated>2025-10-21T05:12:37Z</updated>
    <published>2019-11-02T11:04:25Z</published>
    <summary type="html">I have the same problem in 7.1.&lt;br /&gt;I never find where we can change this.&lt;br /&gt;I am interested if you find a solution. </summary>
    <dc:creator>Eric DARIEL</dc:creator>
    <dc:date>2019-11-02T11:04:25Z</dc:date>
  </entry>
  <entry>
    <title>Liferay 7.2 CE, automatic scroll to full content asset: how to disable it?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117612689" />
    <author>
      <name>Alessandro Candini</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=117612689</id>
    <updated>2021-10-04T17:33:58Z</updated>
    <published>2019-10-31T11:37:51Z</published>
    <summary type="html">&lt;p&gt;I have an Asset Publisher, showing a content detail through a display
  page (&amp;quot;&lt;em&gt;Set as the Default Asset Publisher for This
  Page&lt;/em&gt;&amp;quot; set) and it works great, showing me the content with
  the usual URL &lt;em&gt;myportal/-/my-content-name&lt;/em&gt;.&lt;br /&gt; So far, so
  good...the only problem is that at the end of page loading, the
  content is scrolled up to the following anchor injected by Liferay:&lt;/p&gt;
&lt;pre&gt;
&lt;code&gt;...
&lt;/code&gt;&lt;/pre&gt;
&lt;div class="portlet-body"&gt;
  &lt;code&gt;&amp;amp;nbsp; &amp;lt;div class=&amp;quot;asset-full-content clearfix mb-5
    default-asset-publisher no-title &amp;quot;&amp;gt; &amp;amp;nbsp;&amp;amp;nbsp;
    &amp;amp;nbsp;&amp;lt;span class=&amp;quot;asset-anchor lfr-asset-anchor&amp;quot;
    id=&amp;quot;55130&amp;quot;&amp;gt;&amp;lt;/span&amp;gt; ... &amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;p&gt;Is that possible to disable this unwanted behaviour?&lt;br /&gt; Thank you.&lt;/p&gt;</summary>
    <dc:creator>Alessandro Candini</dc:creator>
    <dc:date>2019-10-31T11:37:51Z</dc:date>
  </entry>
</feed>
