Is fine but how can fix that? Any other way? Try to search but got nothing about it. Every site must use scrollTop with click function and set preventDefault(); so there must be a way use both scroll smooth with target
Console log this and check whether it returns the desired result,
Note: e.preventDefault() only stops the propaga5, means, it will stop the functionality of page refresh when the link is clicked but the function called inside will work, in your case check which I mentioned above, or else follow the method from the link i referred, it just stores the hash value, which is a convenient method i guess