I have set an anchor #corrupcao in the page, and when I open it using an URL with the anchor specified, for a few seconds, I see the page is correctly positioned at the anchor, but after that it goes to the top of the page. PS: This page was based on the shop filter example.
Open page positioning at specific anchor
3 replies · opened Oct 16, 2021
Hello,
This issue is because the following code:
[ch_pre][/ch_pre]
is getting converted as an IsoTope Grid Item which is positioned absolutely on the Page and the correct position is not determined. Simply add the above code inside the .product DIV:
[ch_pre]
...
[/ch_pre]
This should fix the issue. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
It still doesn't work... well, it works only if you are already with that page opened.
You can test opening www.firebase.com.br, then click the top menu "Suporte" and click in "Bases corrompidas" and you will see the problem happening.
Hello,
Thanks for your Patience!
We have checked this out and the issue is due to the IsoTope Grid and it appears that the Scroll to Section will not work in this case due to Absolute Positioning. You can consider setting a Default Filter based on the Hash Location defined on the Page and then scroll the Page to the Content Area. Consider using this code:
[ch_pre]<script>
jQuery(window).on( 'pluginIsotopeReady', function(){
var locationHash = window.location.hash,
hashJQ = $( locationHash );
if( hashJQ.length > 0 ) {
if( hashJQ.parents( '.grid-container' ).length < 1 ) {
return true;
}
setTimeout( function(){
var offset = hashJQ.offset().top - 80;
$('html,body').stop(true, true).animate({
'scrollTop': offset
}, 1250, 'easeInQuad' );
}, 1000);
}
});
</script>[/ch_pre]
This should work fine. Hope this Helps!
Let us know if we can help you with anything else or if you find any further issues.
Have the same question, or something new?
Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.
Reply on the dashboard