0

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.

Reza Ghorbani
  • 2,396
  • 2
  • 28
  • 33
alisol
  • 11
  • 6

2 Answers2

2

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.

Tobias Timm
  • 1,855
  • 15
  • 27
0

First of all you have to check the class, id or tag of the scroll to top button on the basis of which you can let javascript to identify that button. lets suppose you get id i.e. scroll-btn

Now you can write javascript code

document.getElementById('scroll-btn').style.display = "none";

there you go..

Reza Ghorbani
  • 2,396
  • 2
  • 28
  • 33
Adnan Tariq
  • 167
  • 5
  • It might be sufficient to do this without JS by just adding the `display: none` property to the scroll buttons CSS. – lupz Nov 12 '19 at 11:13
  • So how can I get its class or id? We are talking about a **mobile browser without any console**. – alisol Nov 12 '19 at 12:06
  • check this https://stackoverflow.com/questions/24893299/can-you-inspect-element-on-a-samsung-tablets-default-internet-application – Adnan Tariq Nov 14 '19 at 07:52
  • Check my answer below https://stackoverflow.com/a/63056480/4943147 – Tobias Timm Jul 23 '20 at 14:21