Search code examples
javascripthtmlcssmobile-browsersamsung-browser

How to disable or hide the scroll to top button programmatically with HTML/CSS/JS? (Samsung Internet Browser)


I have an online store and in the mobile version, on the product page, the "Add to Cart" button is at the bottom of the page.

The problem is that only in the Samsung Internet browser, a "Scroll to Top" button is placed on the "Add to Cart" button and covers it.

So how can I remove this button programmatically with a HTML/CSS/JS Code?

Note: This button is added to the page by Samsung Browser and there is no problem with other browsers such as Google Chrome and Firefox.


Solution

  • The button is a native functionality of the Samsung browser.

    It is not available within the DOM of the page, so you can't disable/hide it via JS/CSS.

    Every user needs to deactivate it within their Samsung browser settings.