Jump to content

Product Comments : Page refresh after click


AcidLava

Recommended Posts

Hi,

On a product with reviews, when clicking on "Read user reviews" (linked to an anchor by the module), the page refresh quicky after.

Any idea on how to fix this issue ? Thanks.

Expected behavior

Should stay to the bottom page comments list without refreshing the page.

Steps to reproduce

Click to "Read user reviews" on a product with reviews.

PrestaShop version(s) where the bug happened

8.1

PHP version(s) where the bug happened

8

Module

Product Comments

 

Capture d’écran 2023-11-22 à 11.26.48.png

Capture d’écran 2023-11-22 à 11.28.46.png

Edited by AcidLava (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...

Hi
The preventDefault() function in your code shared i.e. ((click)="$event.preventDefault()") is intended to stop the default action of the link (which is page navigation). Please check if there's any other script or event handler that might be overriding this behavior
Also, Verify that the anchor link (href="#product-comments-list-header") is correctly targeting the ID of the reviews section. Means that the ID should be present on the page

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...