0

I have this line in my code: this.template.querySelector('.some-class').scrollIntoView(); and it works on desktops (at least it scrolls a bit) but doesn't work in Salesforce Mobile App at all. Do you have any known workarounds to make it working on both desktops and mobiles? I need to bring certain div into the view.

1 Answer 1

0

You need to put an object with some parameters: element.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'start' })

2
  • No, unfortunately it doesn't work as well (it does on desktop, but not in the SF Mobile App on iOS)
    – jm.
    Commented Jun 29, 2021 at 10:50
  • Interesting that exact line is working for me on SF Mobile App on iOS so there might be something more going on. Commented Jul 1, 2021 at 9:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .